@Test void testResolveArgumentNoToken() throws Exception { when(methodParameter.getParameterAnnotation(TokenParam.class)).thenReturn(tokenParameter); assertNull(tokenExtractor.resolveArgument(methodParameter, null, webRequest, null)); }
@SuppressWarnings("java:S2259") @Override public @Nullable @CheckForNull Object resolveArgument( MethodParameter parameter, @Nullable @CheckForNull ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable @CheckForNull WebDataBinderFactory binderFactory) throws Exception { return getTokenInternal( webRequest.getHeader(TOKEN_HEADER), webRequest.getParameter(TOKEN_PARAMETER), parameter.getParameterAnnotation(TokenParam.class).required()); }
TokenExtractor implements HandlerMethodArgumentResolver { @SuppressWarnings("java:S2259") @Override public @Nullable @CheckForNull Object resolveArgument( MethodParameter parameter, @Nullable @CheckForNull ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable @CheckForNull WebDataBinderFactory binderFactory) throws Exception { return getTokenInternal( webRequest.getHeader(TOKEN_HEADER), webRequest.getParameter(TOKEN_PARAMETER), parameter.getParameterAnnotation(TokenParam.class).required()); } }
TokenExtractor implements HandlerMethodArgumentResolver { @SuppressWarnings("java:S2259") @Override public @Nullable @CheckForNull Object resolveArgument( MethodParameter parameter, @Nullable @CheckForNull ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable @CheckForNull WebDataBinderFactory binderFactory) throws Exception { return getTokenInternal( webRequest.getHeader(TOKEN_HEADER), webRequest.getParameter(TOKEN_PARAMETER), parameter.getParameterAnnotation(TokenParam.class).required()); }  }
TokenExtractor implements HandlerMethodArgumentResolver { @SuppressWarnings("java:S2259") @Override public @Nullable @CheckForNull Object resolveArgument( MethodParameter parameter, @Nullable @CheckForNull ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable @CheckForNull WebDataBinderFactory binderFactory) throws Exception { return getTokenInternal( webRequest.getHeader(TOKEN_HEADER), webRequest.getParameter(TOKEN_PARAMETER), parameter.getParameterAnnotation(TokenParam.class).required()); }  static String getToken(HttpServletRequest request); @SuppressWarnings("java:S2259") // we use supportsParameter to check if the parameter is available @Override @Nullable @CheckForNull Object resolveArgument(
      MethodParameter parameter,
      @Nullable @CheckForNull ModelAndViewContainer mavContainer,
      NativeWebRequest webRequest,
      @Nullable @CheckForNull WebDataBinderFactory binderFactory); @Override boolean supportsParameter(MethodParameter parameter); }
TokenExtractor implements HandlerMethodArgumentResolver { @SuppressWarnings("java:S2259") @Override public @Nullable @CheckForNull Object resolveArgument( MethodParameter parameter, @Nullable @CheckForNull ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable @CheckForNull WebDataBinderFactory binderFactory) throws Exception { return getTokenInternal( webRequest.getHeader(TOKEN_HEADER), webRequest.getParameter(TOKEN_PARAMETER), parameter.getParameterAnnotation(TokenParam.class).required()); }  static String getToken(HttpServletRequest request); @SuppressWarnings("java:S2259") // we use supportsParameter to check if the parameter is available @Override @Nullable @CheckForNull Object resolveArgument(
      MethodParameter parameter,
      @Nullable @CheckForNull ModelAndViewContainer mavContainer,
      NativeWebRequest webRequest,
      @Nullable @CheckForNull WebDataBinderFactory binderFactory); @Override boolean supportsParameter(MethodParameter parameter); static final String TOKEN_HEADER; static final String TOKEN_PARAMETER; }