Skip to content

Commit ada446b

Browse files
committed
update code style
1 parent 75d7994 commit ada446b

File tree

1 file changed

+7
-4
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy

1 file changed

+7
-4
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.util.List;
3838
import java.util.Set;
3939

40+
import javax.servlet.ServletContext;
4041
import javax.servlet.ServletException;
4142
import javax.servlet.http.Cookie;
4243
import javax.servlet.http.HttpServlet;
@@ -138,13 +139,15 @@ public WebAppProxyServlet() {
138139
}
139140

140141
private String getRmAppPageUrlBase(ApplicationId id) throws YarnException, IOException {
141-
return ((AppReportFetcher) getServletContext().getAttribute(WebAppProxy.FETCHER_ATTRIBUTE))
142-
.getRmAppPageUrlBase(id);
142+
ServletContext context = getServletContext();
143+
AppReportFetcher af = (AppReportFetcher) context.getAttribute(WebAppProxy.FETCHER_ATTRIBUTE);
144+
return af.getRmAppPageUrlBase(id);
143145
}
144146

145147
private String getAhsAppPageUrlBase() {
146-
return ((AppReportFetcher) getServletContext().getAttribute(WebAppProxy.FETCHER_ATTRIBUTE))
147-
.getAhsAppPageUrlBase();
148+
ServletContext context = getServletContext();
149+
AppReportFetcher af = (AppReportFetcher) context.getAttribute(WebAppProxy.FETCHER_ATTRIBUTE);
150+
return af.getAhsAppPageUrlBase();
148151
}
149152

150153
/**

0 commit comments

Comments
 (0)