cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [2/2] cxf git commit: Preveinting NPE in JAXRS HttpServletRequestFilter
Date Mon, 27 Feb 2017 11:04:53 GMT
Preveinting NPE in JAXRS HttpServletRequestFilter


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c505778b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c505778b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c505778b

Branch: refs/heads/3.1.x-fixes
Commit: c505778b13b3588b6fc2805d132bcea14af58597
Parents: 283f28d
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Feb 27 11:03:14 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Feb 27 11:04:15 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/impl/HttpServletRequestFilter.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c505778b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpServletRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpServletRequestFilter.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpServletRequestFilter.java
index eb1758a..e5a1b28 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpServletRequestFilter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpServletRequestFilter.java
@@ -65,7 +65,7 @@ public class HttpServletRequestFilter extends HttpServletRequestWrapper
{
     @Override
     public String getParameter(String name) {
         String[] values = this.getParameterValues(name);
-        return values == null ? null : values[0];
+        return values == null || values.length == 0 ? null : values[0];
     }
     @Override
     public String[] getParameterValues(String name) {


Mime
View raw message