@Test(expected=NullPointerException.class) public void extractHost_NULL() { HttpServletRequestUtils.extractHost(null); }
public static String extractHost(HttpServletRequest request) { Preconditions.checkNotNull(request); String host = request.getHeader("X-FORWARDED-HOST"); if (host == null) { host = request.getServerName(); } return host; }
HttpServletRequestUtils { public static String extractHost(HttpServletRequest request) { Preconditions.checkNotNull(request); String host = request.getHeader("X-FORWARDED-HOST"); if (host == null) { host = request.getServerName(); } return host; } }
HttpServletRequestUtils { public static String extractHost(HttpServletRequest request) { Preconditions.checkNotNull(request); String host = request.getHeader("X-FORWARDED-HOST"); if (host == null) { host = request.getServerName(); } return host; } private  HttpServletRequestUtils(); }
HttpServletRequestUtils { public static String extractHost(HttpServletRequest request) { Preconditions.checkNotNull(request); String host = request.getHeader("X-FORWARDED-HOST"); if (host == null) { host = request.getServerName(); } return host; } private  HttpServletRequestUtils(); static String extractClientIp(HttpServletRequest request); static String extractScheme(HttpServletRequest request); static String extractHost(HttpServletRequest request); static int extractServerPort(HttpServletRequest request); static String constructRequestBaseUrl(HttpServletRequest request); static String constructRequestUrl(HttpServletRequest request); static String constructRequestUrlWithParameters(HttpServletRequest request); static boolean isDefaultPort(String scheme, int port); }
HttpServletRequestUtils { public static String extractHost(HttpServletRequest request) { Preconditions.checkNotNull(request); String host = request.getHeader("X-FORWARDED-HOST"); if (host == null) { host = request.getServerName(); } return host; } private  HttpServletRequestUtils(); static String extractClientIp(HttpServletRequest request); static String extractScheme(HttpServletRequest request); static String extractHost(HttpServletRequest request); static int extractServerPort(HttpServletRequest request); static String constructRequestBaseUrl(HttpServletRequest request); static String constructRequestUrl(HttpServletRequest request); static String constructRequestUrlWithParameters(HttpServletRequest request); static boolean isDefaultPort(String scheme, int port);  }