style: 应用 Spotless 代码格式化
- 对所有 Java 源文件应用统一的代码格式化 - 统一缩进为 4 个空格 - 清理尾随空白字符和文件末尾换行 - 优化导入语句组织 - 总计格式化 654 个 Java 文件 有问题可以回滚或者找我聊
This commit is contained in:
@@ -5,6 +5,10 @@ package com.starry.common.utils;
|
||||
* @since 2024/7/25 下午3:15
|
||||
**/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Objects;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.lionsoul.ip2region.DataBlock;
|
||||
@@ -13,11 +17,6 @@ import org.lionsoul.ip2region.DbSearcher;
|
||||
import org.lionsoul.ip2region.Util;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 根据ip离线查询地址
|
||||
*
|
||||
@@ -74,16 +73,16 @@ public class RegionUtils {
|
||||
int algorithm = DbSearcher.MEMORY_ALGORITYM;
|
||||
Method method = null;
|
||||
switch (algorithm) {
|
||||
case DbSearcher.BTREE_ALGORITHM:
|
||||
case DbSearcher.BTREE_ALGORITHM :
|
||||
method = searcher.getClass().getMethod("btreeSearch", String.class);
|
||||
break;
|
||||
case DbSearcher.BINARY_ALGORITHM:
|
||||
case DbSearcher.BINARY_ALGORITHM :
|
||||
method = searcher.getClass().getMethod("binarySearch", String.class);
|
||||
break;
|
||||
case DbSearcher.MEMORY_ALGORITYM:
|
||||
case DbSearcher.MEMORY_ALGORITYM :
|
||||
method = searcher.getClass().getMethod("memorySearch", String.class);
|
||||
break;
|
||||
default:
|
||||
default :
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
@@ -103,4 +102,4 @@ public class RegionUtils {
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user