Skip to content

Commit

Permalink
OF-1902: Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
GregDThomas authored and guusdk committed Nov 21, 2019
1 parent 32ae622 commit a2c82ee
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public class FaviconServlet extends HttpServlet {
* Cache the favicons that we've found.
*/
private Cache<String, byte[]> hitsCache;
private SessionManager sessionManager;

@Override
public void init(ServletConfig config) throws ServletException {
Expand All @@ -100,7 +99,6 @@ public void init(ServletConfig config) throws ServletException {
// Initialize caches.
missesCache = CacheFactory.createCache("Favicon Misses");
hitsCache = CacheFactory.createCache("Favicon Hits");
sessionManager = SessionManager.getInstance();
}

@Override
Expand All @@ -123,6 +121,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) {
final String host = request.getParameter("host");

// Validate that we're connected to the host
final SessionManager sessionManager = SessionManager.getInstance();
final Optional<String> optionalHost = Stream
.concat(sessionManager.getIncomingServers().stream(), sessionManager.getOutgoingServers().stream())
.filter(remoteServerHost -> remoteServerHost.equalsIgnoreCase(host))
Expand Down

0 comments on commit a2c82ee

Please sign in to comment.