Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-225

Wrong null check in the SpringContextLoader class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 1.1.RC2
    • None
    • None
    • None
    • Low

      There is a wrong null check in the SpringContextLoader class. After the dispatcher is created the registry is checked for null and not the dispatcher object as it should be.

      final Registry registry = (Registry) servletContext.getAttribute(Registry.class.getName());
      if (registry == null)
      throw new RuntimeException("RESTeasy Registry is null, do ou have the ResteasyBootstrap listener configured?");

      final Dispatcher dispatcher = (Dispatcher) servletContext.getAttribute(Dispatcher.class.getName());
      /* Should be if (dispatcher == null) */
      if (registry == null)
      throw new RuntimeException("RESTeasy Dispatcher is null, do ou have the ResteasyBootstrap listener configured?");

              patriot1burke@gmail.com Bill Burke (Inactive)
              johanhammar Johan Hammar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: