cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Preveinting NPE in JAXRS HttpServletRequestFilter
Date Mon, 27 Feb 2017 11:03:30 GMT
Repository: cxf
Updated Branches:
  refs/heads/master f1593e4d3 -> 19cad14f4


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/19cad14f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/19cad14f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/19cad14f

Branch: refs/heads/master
Commit: 19cad14f41be42f02a429bdcf93613fa43673448
Parents: f1593e4
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:03:14 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/19cad14f/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 b1724f3..750c2f5 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