You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2020/03/09 19:28:33 UTC

[GitHub] [cxf] WhiteCat22 opened a new pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl

WhiteCat22 opened a new pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl
URL: https://github.com/apache/cxf/pull/649
 
 
   instead of throwing a NullPointerException

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] WhiteCat22 commented on issue #649: CXF-8235 Handle null continuation in AsyncResponseImpl

Posted by GitBox <gi...@apache.org>.
WhiteCat22 commented on issue #649: CXF-8235 Handle null continuation in AsyncResponseImpl
URL: https://github.com/apache/cxf/pull/649#issuecomment-596736738
 
 
   Please backport to 3.3.X. 
   And 3.1.X (I realize this is a stretch)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta commented on a change in pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl
URL: https://github.com/apache/cxf/pull/649#discussion_r390093975
 
 

 ##########
 File path: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java
 ##########
 @@ -302,6 +302,11 @@ public synchronized void handleTimeout() {
     private void initContinuation() {
         ContinuationProvider provider =
             (ContinuationProvider)inMessage.get(ContinuationProvider.class.getName());
+        if (provider == null) {
+            throw new IllegalArgumentException(
 
 Review comment:
   Very minor, I would probably go with `IllegalStateException` (seems to fit better to this particular issue) but `IllegalArgumentException` is also fine.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta merged pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl

Posted by GitBox <gi...@apache.org>.
reta merged pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl
URL: https://github.com/apache/cxf/pull/649
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] bmhm commented on a change in pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl

Posted by GitBox <gi...@apache.org>.
bmhm commented on a change in pull request #649: CXF-8235 Handle null continuation in AsyncResponseImpl
URL: https://github.com/apache/cxf/pull/649#discussion_r390148872
 
 

 ##########
 File path: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java
 ##########
 @@ -302,6 +302,11 @@ public synchronized void handleTimeout() {
     private void initContinuation() {
         ContinuationProvider provider =
             (ContinuationProvider)inMessage.get(ContinuationProvider.class.getName());
+        if (provider == null) {
+            throw new IllegalArgumentException(
 
 Review comment:
   The filters are a kind of argument, aren't they? When defining a filter in `web.xml` or via `@WebFilter`… So yes, both are probably fine.
   
   Anyway, the important thing here is that users see an exception with a somewhat meaningful message. Without this fix, if you use e.g. Apache Shiro `shiro-servlet:1.4.0`, you can only see a `NullPointerException` with a CXF stack trace, which is not helpful at all. See the stack trace here: https://github.com/bmhm/shiro-openliberty-npe and the issue for Apache SHIRO here: https://issues.apache.org/jira/projects/SHIRO/issues/SHIRO-735. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services