Remove redundant code of http servlet request fetching globally

pull/755/head
johnniang 2019-11-30 23:23:06 +08:00
parent c643e204f8
commit 0c1b32e776
1 changed files with 0 additions and 11 deletions

View File

@ -30,17 +30,6 @@ public class HaloUtils {
public static final String URL_SEPARATOR = "/";
/**
* Gets current http servlet request.
*
* @return current http servlet request
*/
@NonNull
public static HttpServletRequest getHttpServletRequest() {
return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes()))
.getRequest();
}
@NonNull
public static String ensureBoth(@NonNull String string, @NonNull String bothfix) {
return ensureBoth(string, bothfix, bothfix);