Buggy code:
private boolean synchronizeOnSession = false ; private ParameterNameDiscoverer parameterNameDiscoverer = new LocalVariableTableParameterNameDiscoverer ( ) ; private WebArgumentResolver [ ] customArgumentResolvers ; private ModelAndViewResolver [ ] customModelAndViewResolvers ; private HttpMessageConverter < ? > [ ] messageConverters = new HttpMessageConverter [ ] { new ByteArrayHttpMessageConverter ( ) , new StringHttpMessageConverter ( ) , new SourceHttpMessageConverter ( ) , new XmlAwareFormHttpMessageConverter ( ) } ; private int order = Ordered . LOWEST_PRECEDENCE ; private ConfigurableBeanFactory beanFactory ; private BeanExpressionContext expressionContext ; private final Map < Class < ? > , AnnotationMethodHandlerAdapter . ServletHandlerMethodResolver > methodResolverCache = new ConcurrentHashMap < Class < ? > , AnnotationMethodHandlerAdapter . ServletHandlerMethodResolver > ( ) ; public AnnotationMethodHandlerAdapter ( ) { } public void setAlwaysUseFullPath ( boolean alwaysUseFullPath ) { } public void setUrlDecode ( boolean urlDecode ) { } public void setUrlPathHelper ( UrlPathHelper urlPathHelper ) { } public void setPathMatcher ( PathMatcher pathMatcher ) { } public void setMethodNameResolver ( MethodNameResolver methodNameResolver ) { } public void setWebBindingInitializer ( WebBindingInitializer webBindingInitializer ) { } public void setSessionAttributeStore ( SessionAttributeStore sessionAttributeStore ) { } public void setCacheSecondsForSessionAttributeHandlers ( int cacheSecondsForSessionAttributeHandlers ) { } public void setSynchronizeOnSession ( boolean synchronizeOnSession ) { } public void setParameterNameDiscoverer ( ParameterNameDiscoverer parameterNameDiscoverer ) { } public void setCustomArgumentResolver ( WebArgumentResolver argumentResolver ) { } public void setCustomArgumentResolvers ( WebArgumentResolver [ ] argumentResolvers ) { } public void setCustomModelAndViewResolver ( ModelAndViewResolver customModelAndViewResolver ) { } public void setCustomModelAndViewResolvers ( ModelAndViewResolver [ ] customModelAndViewResolvers ) { } public void setMessageConverters ( HttpMessageConverter < ? > [ ] messageConverters ) { } public HttpMessageConverter < ? > [ ] getMessageConverters ( ) { } public void setOrder ( int order ) { } public int getOrder ( ) { } public void setBeanFactory ( BeanFactory beanFactory ) { } public boolean supports ( Object handler ) { } public ModelAndView handle ( HttpServletRequest request , HttpServletResponse response , Object handler ) throws Exception { } protected ModelAndView invokeHandlerMethod ( HttpServletRequest request , HttpServletResponse response , Object handler ) throws Exception { } public long getLastModified ( HttpServletRequest request , Object handler ) { } private AnnotationMethodHandlerAdapter . ServletHandlerMethodResolver getMethodResolver ( Object handler ) { } protected ServletRequestDataBinder createBinder ( HttpServletRequest request , Object target , String objectName ) throws Exception { } protected HttpInputMessage createHttpInputMessage ( HttpServletRequest servletRequest ) throws Exception { } protected HttpOutputMessage createHttpOutputMessage ( HttpServletResponse servletResponse ) throws Exception { } private class ServletHandlerMethodResolver extends HandlerMethodResolver { private ServletHandlerMethodResolver ( Class < ? > handlerType ) { } public Method resolveHandlerMethod ( HttpServletRequest request ) throws ServletException { } private String getMatchedPattern ( String methodLevelPattern , String lookupPath , HttpServletRequest request ) { } private boolean isPathMatchInternal ( String pattern , String lookupPath ) { } @ SuppressWarnings ( "unchecked" ) private void extractHandlerMethodUriTemplates ( String mappedPattern , String lookupPath , HttpServletRequest request ) { } } private class ServletHandlerMethodInvoker extends HandlerMethodInvoker { private boolean responseArgumentUsed = false ; private ServletHandlerMethodInvoker ( HandlerMethodResolver resolver ) { } @ Override protected void raiseMissingParameterException ( String paramName , Class paramType ) throws Exception { } @ Override protected void raiseSessionRequiredException ( String message ) throws Exception { } @ Override protected WebDataBinder createBinder ( NativeWebRequest webRequest , Object target , String objectName ) throws Exception { } @ Override protected void doBind ( WebDataBinder binder , NativeWebRequest webRequest ) throws Exception { } @ Override protected HttpInputMessage createHttpInputMessage ( NativeWebRequest webRequest ) throws Exception { } @ Override protected HttpOutputMessage createHttpOutputMessage ( NativeWebRequest webRequest ) throws Exception { } @ Override protected Object resolveDefaultValue ( String value ) { } @ Override protected Object resolveCookieValue ( String cookieName , Class paramType , NativeWebRequest webRequest ) throws Exception { HttpServletRequest servletRequest = webRequest . getNativeRequest ( HttpServletRequest . class ) ; Cookie cookieValue = WebUtils . getCookie ( servletRequest , cookieName ) ; if ( Cookie . class . isAssignableFrom ( paramType ) ) { return cookieValue ; } else if ( cookieValue != null ) { <START_BUG> return cookieValue . getValue ( ) ; <END_BUG> } else { return null ; } } @ Override @ SuppressWarnings ( { "unchecked" } ) protected String resolvePathVariable ( String pathVarName , Class paramType , NativeWebRequest webRequest ) throws Exception { } @ Override protected Object resolveStandardArgument ( Class < ? > parameterType , NativeWebRequest webRequest ) throws Exception { } @ SuppressWarnings ( "unchecked" ) public ModelAndView getModelAndView ( Method handlerMethod , Class handlerType , Object returnValue , ExtendedModelMap implicitModel , ServletWebRequest webRequest ) throws Exception { } private void handleResponseBody ( Object returnValue , ServletWebRequest webRequest ) throws Exception { } private void handleHttpEntityResponse ( HttpEntity < ? > responseEntity , ServletWebRequest webRequest ) throws Exception { } @ SuppressWarnings ( "unchecked" ) private void writeWithMessageConverters ( Object returnValue , HttpInputMessage inputMessage , HttpOutputMessage outputMessage ) throws IOException , HttpMediaTypeNotAcceptableException { } } static class RequestMappingInfo { String [ ] paths = new String [ 0 ] ; List < String > matchedPaths = Collections . emptyList ( ) ; RequestMethod [ ] methods = new RequestMethod [ 0 ] ; String [ ] params = new String [ 0 ] ; String [ ] headers = new String [ 0 ] ; public String bestMatchedPath ( ) { } public boolean matches ( HttpServletRequest request ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } } static class RequestMappingInfoComparator implements Comparator < AnnotationMethodHandlerAdapter . RequestMappingInfo > { private final Comparator < String > pathComparator ; private final ServerHttpRequest request ; RequestMappingInfoComparator ( Comparator < String > pathComparator , HttpServletRequest request ) { } public int compare ( AnnotationMethodHandlerAdapter . RequestMappingInfo info1 , AnnotationMethodHandlerAdapter . RequestMappingInfo info2 ) { } private int compareAcceptHeaders ( AnnotationMethodHandlerAdapter . RequestMappingInfo info1 , AnnotationMethodHandlerAdapter . RequestMappingInfo info2 ) { } private int indexOfIncluded ( List < MediaType > infoAccepts , MediaType requestAccept ) { }

Fix:
return urlPathHelper . decodeRequestString ( servletRequest , cookieValue . getValue ( ) ) ;