Author: bobby Date: Fri Dec 28 14:21:07 2012 New Revision: 1426515 URL: http://svn.apache.org/viewvc?rev=1426515&view=rev Log: YARN-225. Proxy Link in RM UI thows NPE in Secure mode (Devaraj K via bobby)
Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt?rev=1426515&r1=1426514&r2=1426515&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt Fri Dec 28 14:21:07 2012 @@ -248,6 +248,9 @@ Release 0.23.6 - UNRELEASED YARN-280. RM does not reject app submission with invalid tokens (Daryn Sharp via tgraves) + YARN-225. Proxy Link in RM UI thows NPE in Secure mode + (Devaraj K via bobby) + Release 0.23.5 - UNRELEASED INCOMPATIBLE CHANGES Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java?rev=1426515&r1=1426514&r2=1426515&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java (original) +++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java Fri Dec 28 14:21:07 2012 @@ -254,11 +254,14 @@ public class WebAppProxyServlet extends if(securityEnabled) { String cookieName = getCheckCookieName(id); - for(Cookie c: req.getCookies()) { - if(cookieName.equals(c.getName())) { - userWasWarned = true; - userApproved = userApproved || Boolean.valueOf(c.getValue()); - break; + Cookie[] cookies = req.getCookies(); + if (cookies != null) { + for (Cookie c : cookies) { + if (cookieName.equals(c.getName())) { + userWasWarned = true; + userApproved = userApproved || Boolean.valueOf(c.getValue()); + break; + } } } }