@Test public void testNulltIsResolved() { HttpServletRequestResolver resolver = new HttpServletRequestResolver(); assertNull(resolver.resolve("whatever", "request", null)); assertNull(resolver.resolve(null, "foo", null)); }
@Override public Object resolve(Object contextObject, String name, ResolutionContext context) { if (contextObject != null) { return null; } if (NAME_REQUEST.equals(name)) { HttpServletRequestWrapper wrapper = REQUEST_WRAPPER.get(); if (wrapper == null) { HttpServletRequest request = RequestHolder.getCurrentRequest(); if (request != null) { wrapper = new HttpServletRequestWrapper(request); REQUEST_WRAPPER.set(wrapper); } else { LOGGER.warn("Unable to get the current HTTP request"); } } return wrapper; } return null; }
HttpServletRequestResolver extends AbstractResolver implements MustacheListener, Validateable { @Override public Object resolve(Object contextObject, String name, ResolutionContext context) { if (contextObject != null) { return null; } if (NAME_REQUEST.equals(name)) { HttpServletRequestWrapper wrapper = REQUEST_WRAPPER.get(); if (wrapper == null) { HttpServletRequest request = RequestHolder.getCurrentRequest(); if (request != null) { wrapper = new HttpServletRequestWrapper(request); REQUEST_WRAPPER.set(wrapper); } else { LOGGER.warn("Unable to get the current HTTP request"); } } return wrapper; } return null; } }
HttpServletRequestResolver extends AbstractResolver implements MustacheListener, Validateable { @Override public Object resolve(Object contextObject, String name, ResolutionContext context) { if (contextObject != null) { return null; } if (NAME_REQUEST.equals(name)) { HttpServletRequestWrapper wrapper = REQUEST_WRAPPER.get(); if (wrapper == null) { HttpServletRequest request = RequestHolder.getCurrentRequest(); if (request != null) { wrapper = new HttpServletRequestWrapper(request); REQUEST_WRAPPER.set(wrapper); } else { LOGGER.warn("Unable to get the current HTTP request"); } } return wrapper; } return null; } HttpServletRequestResolver();  HttpServletRequestResolver(int priority); }
HttpServletRequestResolver extends AbstractResolver implements MustacheListener, Validateable { @Override public Object resolve(Object contextObject, String name, ResolutionContext context) { if (contextObject != null) { return null; } if (NAME_REQUEST.equals(name)) { HttpServletRequestWrapper wrapper = REQUEST_WRAPPER.get(); if (wrapper == null) { HttpServletRequest request = RequestHolder.getCurrentRequest(); if (request != null) { wrapper = new HttpServletRequestWrapper(request); REQUEST_WRAPPER.set(wrapper); } else { LOGGER.warn("Unable to get the current HTTP request"); } } return wrapper; } return null; } HttpServletRequestResolver();  HttpServletRequestResolver(int priority); @Override Object resolve(Object contextObject, String name,
            ResolutionContext context); @Override void init(); @Override Set<ConfigurationKey> getConfigurationKeys(); @Override void renderingStarted(MustacheRenderingEvent event); @Override boolean isValid(); }
HttpServletRequestResolver extends AbstractResolver implements MustacheListener, Validateable { @Override public Object resolve(Object contextObject, String name, ResolutionContext context) { if (contextObject != null) { return null; } if (NAME_REQUEST.equals(name)) { HttpServletRequestWrapper wrapper = REQUEST_WRAPPER.get(); if (wrapper == null) { HttpServletRequest request = RequestHolder.getCurrentRequest(); if (request != null) { wrapper = new HttpServletRequestWrapper(request); REQUEST_WRAPPER.set(wrapper); } else { LOGGER.warn("Unable to get the current HTTP request"); } } return wrapper; } return null; } HttpServletRequestResolver();  HttpServletRequestResolver(int priority); @Override Object resolve(Object contextObject, String name,
            ResolutionContext context); @Override void init(); @Override Set<ConfigurationKey> getConfigurationKeys(); @Override void renderingStarted(MustacheRenderingEvent event); @Override boolean isValid(); static final int SERVLET_REQUEST_RESOLVER_PRIORITY; static final ConfigurationKey ENABLED_KEY; }