From 1ad628f94416d4fc21aca856a05c99d2d9fc4937 Mon Sep 17 00:00:00 2001 From: Looly Date: Mon, 13 Mar 2023 11:41:20 +0800 Subject: [PATCH] fix code --- .gitee/ISSUE_TEMPLATE.zh-CN.md | 4 ++-- .github/ISSUE_TEMPLATE.md | 4 ++-- README-EN.md | 6 +++--- README.md | 6 +++--- SECURITY.md | 2 +- bin/replaceVersion.sh | 12 ++++++------ .../cn/hutool/core/annotation/AnnotationMapping.java | 2 +- .../java/cn/hutool/core/date/BetweenFormatter.java | 2 +- .../main/java/cn/hutool/core/io/file/FileReader.java | 3 ++- .../cn/hutool/core/io/resource/ResourceUtil.java | 1 + .../java/cn/hutool/core/lang/range/BoundedRange.java | 2 +- .../hutool/core/stream/TerminableWrappedStream.java | 3 ++- .../java/cn/hutool/core/text/AntPathMatcher.java | 2 +- .../src/main/java/cn/hutool/core/util/ArrayUtil.java | 2 +- .../test/java/cn/hutool/core/text/StrUtilTest.java | 1 + .../test/java/cn/hutool/core/util/ArrayUtilTest.java | 6 +++--- .../test/java/cn/hutool/core/util/ZipUtilTest.java | 7 ++++--- .../src/main/java/cn/hutool/crypto/BCUtil.java | 2 +- .../cn/hutool/crypto/symmetric/Sm4StreamTest.java | 12 ++++++------ .../resources/config/example/db-example-dbcp.setting | 4 ++-- .../hutool/extra/aop/interceptor/JdkInterceptor.java | 6 ++++++ .../cn/hutool/extra/management/oshi/CpuTicks.java | 2 +- .../src/main/java/cn/hutool/poi/csv/CsvRow.java | 10 ++-------- .../src/main/java/cn/hutool/poi/csv/CsvWriter.java | 2 +- .../java/cn/hutool/swing/img/BackgroundRemoval.java | 10 +++++----- 25 files changed, 59 insertions(+), 54 deletions(-) diff --git a/.gitee/ISSUE_TEMPLATE.zh-CN.md b/.gitee/ISSUE_TEMPLATE.zh-CN.md index 6a1c8ee09..920eaa91f 100644 --- a/.gitee/ISSUE_TEMPLATE.zh-CN.md +++ b/.gitee/ISSUE_TEMPLATE.zh-CN.md @@ -11,8 +11,8 @@ hutool版本: 5.X.X(请确保最新尝试是否还有问题) Console.log("报错了"); ``` -2. 堆栈信息 +1. 堆栈信息 -3. 测试涉及到的文件(注意脱密) +2. 测试涉及到的文件(注意脱密) 比如报错的Excel文件,有问题的图片等。 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 6a1c8ee09..920eaa91f 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -11,8 +11,8 @@ hutool版本: 5.X.X(请确保最新尝试是否还有问题) Console.log("报错了"); ``` -2. 堆栈信息 +1. 堆栈信息 -3. 测试涉及到的文件(注意脱密) +2. 测试涉及到的文件(注意脱密) 比如报错的Excel文件,有问题的图片等。 \ No newline at end of file diff --git a/README-EN.md b/README-EN.md index 1acb7eaeb..0aca83d4a 100755 --- a/README-EN.md +++ b/README-EN.md @@ -176,10 +176,10 @@ cd ${hutool} Hutool's source code is divided into two branches: -| branch | description | -|-----------|---------------------------------------------------------------| +| branch | description | +|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| | v6-master | The master branch, the branch used by the release version, is the same as the jar committed to the central repository and does not receive any pr or modifications. | -| v6-dev | Development branch, which defaults to the next SNAPSHOT version, accepts modifications or pr | +| v6-dev | Development branch, which defaults to the next SNAPSHOT version, accepts modifications or pr | ### 🐞Provide feedback or suggestions on bugs diff --git a/README.md b/README.md index c24d857fb..dda1ddff4 100755 --- a/README.md +++ b/README.md @@ -180,10 +180,10 @@ implementation 'cn.hutool:hutool-all:6.0.0.M1' Hutool的源码分为两个分支,功能如下: -| 分支 | 作用 | -|-----------|---------------------------------------------------------------| +| 分支 | 作用 | +|-----------|--------------------------------------------| | v6-master | 主分支,release版本使用的分支,与中央库提交的jar一致,不接收任何pr或修改 | -| v6-dev | 开发分支,默认为下个版本的SNAPSHOT版本,接受修改或pr | +| v6-dev | 开发分支,默认为下个版本的SNAPSHOT版本,接受修改或pr | ### 🐞提供bug反馈或建议 diff --git a/SECURITY.md b/SECURITY.md index 0edd9b589..ec97fe9b2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -3,7 +3,7 @@ ## Supported Versions(支持的版本) | Version | Supported | -|---------| ------------------ | +|---------|--------------------| | 6.x.x | :white_check_mark: | ## Reporting a Vulnerability(报告漏洞) diff --git a/bin/replaceVersion.sh b/bin/replaceVersion.sh index f6f60c81e..8bd8d2d29 100755 --- a/bin/replaceVersion.sh +++ b/bin/replaceVersion.sh @@ -12,7 +12,7 @@ echo "当前路径:${pwd}" if [ -n "$1" ];then new_version="$1" - old_version=`cat ${pwd}/bin/version.txt` + old_version=$(cat "${pwd}"/bin/version.txt) echo "$old_version 替换为新版本 $new_version" else # 参数错误,退出 @@ -20,16 +20,16 @@ else exit fi -if [ ! -n "$old_version" ]; then +if [ -z "$old_version" ]; then echo "ERROR: 旧版本不存在,请确认bin/version.txt中信息正确" exit fi # 替换README.md中的版本 -sed -i "s/${old_version}/${new_version}/g" $pwd/README.md -sed -i "s/${old_version}/${new_version}/g" $pwd/README-EN.md +sed -i "s/${old_version}/${new_version}/g" "$pwd"/README.md +sed -i "s/${old_version}/${new_version}/g" "$pwd"/README-EN.md # 替换docs/js/version.js中的版本 -sed -i "s/${old_version}/${new_version}/g" $pwd/docs/js/version.js +sed -i "s/${old_version}/${new_version}/g" "$pwd"/docs/js/version.js # 保留新版本号 -echo "$new_version" > $pwd/bin/version.txt +echo "$new_version" > "$pwd"/bin/version.txt diff --git a/hutool-core/src/main/java/cn/hutool/core/annotation/AnnotationMapping.java b/hutool-core/src/main/java/cn/hutool/core/annotation/AnnotationMapping.java index c177629f6..c9af1d448 100644 --- a/hutool-core/src/main/java/cn/hutool/core/annotation/AnnotationMapping.java +++ b/hutool-core/src/main/java/cn/hutool/core/annotation/AnnotationMapping.java @@ -28,7 +28,7 @@ public interface AnnotationMapping extends Annotation { T getAnnotation(); /** - * 根据当前映射对象,通过动态代理生成一个类型与被包装注解对象一致的合成注解,该注解相对原生注解: + * 根据当前映射对象,通过动态代理生成一个类型与被包装注解对象一致地合成注解,该注解相对原生注解: *