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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

GitBox
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

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

GitBox
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

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

GitBox
In reply to this post by GitBox
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

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

GitBox
In reply to this post by GitBox
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

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

GitBox
In reply to this post by GitBox
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:
[hidden email]


With regards,
Apache Git Services