You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Benjamin Marwell (Jira)" <ji...@apache.org> on 2020/01/10 17:26:00 UTC

[jira] [Created] (SHIRO-735) Shiro does not suppert servlet-3.1 void method(@Suspended AsyncResponse)

Benjamin Marwell created SHIRO-735:
--------------------------------------

             Summary: Shiro does not suppert servlet-3.1 void method(@Suspended AsyncResponse)
                 Key: SHIRO-735
                 URL: https://issues.apache.org/jira/browse/SHIRO-735
             Project: Shiro
          Issue Type: Task
          Components: Authentication (log-in), Configuration, Web
    Affects Versions: 1.4.2
         Environment: OpenLiberty 18.0.0.4 and higher
Liberty Profile 18.0.0.4 and higher
            Reporter: Benjamin Marwell


++When calling a method which is async (available since servlet 3.1 or even earlier), some web servers like liberty will throw a NPE.

 

example code:
{code:java}
@GET
public void getAction(final @Suspended AsyncResponse asyncResponse) {
  asyncResponse.resume(() -> Response.ok().build());
}{code}
Even before the code is executed, shiro causes a NullPointerException in some application servers, because it does not advertise it is compatible with async servlets / methods.

 

This happens when used with the dependency {{shiro-servlet}}.

 

FIX (PR on the way): Add async to the {{web_fragment.xml}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)