opStack = new Stack<>();
opStack.push(',');// 运算符放入栈底元素逗号,此符号优先级最低
char[] arr = expression.toCharArray();
int currentIndex = 0;// 当前字符的位置
@@ -152,7 +121,7 @@ public class Calculator {
*
* @param cur 下标
* @param peek peek
- * @return 优先级
+ * @return 优先级,如果cur高或相等,返回true,否则false
*/
private boolean compare(char cur, char peek) {// 如果是peek优先级高于cur,返回true,默认都是peek优先级要低
final int offset = 40;
@@ -199,4 +168,34 @@ public class Calculator {
}
return result;
}
+
+ /**
+ * 将表达式中负数的符号更改
+ *
+ * @param expression 例如-2+-1*(-3E-2)-(-1) 被转为 ~2+~1*(~3E~2)-(~1)
+ * @return 转换后的字符串
+ */
+ private static String transform(String expression) {
+ expression = StrUtil.cleanBlank(expression);
+ expression = StrUtil.removeSuffix(expression, "=");
+ final char[] arr = expression.toCharArray();
+ for (int i = 0; i < arr.length; i++) {
+ if (arr[i] == '-') {
+ if (i == 0) {
+ arr[i] = '~';
+ } else {
+ char c = arr[i - 1];
+ if (c == '+' || c == '-' || c == '*' || c == '/' || c == '(' || c == 'E' || c == 'e') {
+ arr[i] = '~';
+ }
+ }
+ }
+ }
+ if (arr[0] == '~' || (arr.length > 1 && arr[1] == '(')) {
+ arr[0] = '-';
+ return "0" + new String(arr);
+ } else {
+ return new String(arr);
+ }
+ }
}
diff --git a/hutool-core/src/main/java/cn/hutool/core/net/url/UrlQuery.java b/hutool-core/src/main/java/cn/hutool/core/net/url/UrlQuery.java
index 0ebbae359..e7507503e 100644
--- a/hutool-core/src/main/java/cn/hutool/core/net/url/UrlQuery.java
+++ b/hutool-core/src/main/java/cn/hutool/core/net/url/UrlQuery.java
@@ -20,6 +20,8 @@ import java.util.Map;
*
* key1=v1&key2=&key3=v3
*
+ * 查询封装分为解析查询字符串和构建查询字符串,解析可通过charset为null来自定义是否decode编码后的内容,
+ * 构建则通过charset是否为null是否encode参数键值对
*
* @author looly
* @since 5.3.1
diff --git a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java b/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java
index 292b89642..e35d51852 100644
--- a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java
+++ b/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java
@@ -514,20 +514,20 @@ public class XmlUtil {
*
* @param doc XML文档
* @param path 文件路径绝对路径或相对ClassPath路径,不存在会自动创建
- * @param charset 自定义XML文件的编码,如果为{@code null} 读取XML文档中的编码,否则默认UTF-8
+ * @param charsetName 自定义XML文件的编码,如果为{@code null} 读取XML文档中的编码,否则默认UTF-8
*/
- public static void toFile(Document doc, String path, String charset) {
- if (StrUtil.isBlank(charset)) {
- charset = doc.getXmlEncoding();
+ public static void toFile(Document doc, String path, String charsetName) {
+ if (StrUtil.isBlank(charsetName)) {
+ charsetName = doc.getXmlEncoding();
}
- if (StrUtil.isBlank(charset)) {
- charset = CharsetUtil.UTF_8;
+ if (StrUtil.isBlank(charsetName)) {
+ charsetName = CharsetUtil.UTF_8;
}
BufferedWriter writer = null;
try {
- writer = FileUtil.getWriter(path, charset, false);
- write(doc, writer, charset, INDENT_DEFAULT);
+ writer = FileUtil.getWriter(path, CharsetUtil.charset(charsetName), false);
+ write(doc, writer, charsetName, INDENT_DEFAULT);
} finally {
IoUtil.close(writer);
}
@@ -783,10 +783,10 @@ public class XmlUtil {
*/
public static Element getElement(Element element, String tagName) {
final NodeList nodeList = element.getElementsByTagName(tagName);
- if (nodeList == null || nodeList.getLength() < 1) {
+ final int length = nodeList.getLength();
+ if (length < 1) {
return null;
}
- int length = nodeList.getLength();
for (int i = 0; i < length; i++) {
Element childEle = (Element) nodeList.item(i);
if (childEle == null || childEle.getParentNode() == element) {
@@ -1499,22 +1499,20 @@ public class XmlUtil {
*/
private void examineNode(Node node, boolean attributesOnly) {
final NamedNodeMap attributes = node.getAttributes();
- if (null != attributes) {
- for (int i = 0; i < attributes.getLength(); i++) {
- Node attribute = attributes.item(i);
- storeAttribute(attribute);
- }
+ final int length = attributes.getLength();
+ for (int i = 0; i < length; i++) {
+ Node attribute = attributes.item(i);
+ storeAttribute(attribute);
}
if (false == attributesOnly) {
final NodeList childNodes = node.getChildNodes();
- if (null != childNodes) {
- Node item;
- for (int i = 0; i < childNodes.getLength(); i++) {
- item = childNodes.item(i);
- if (item.getNodeType() == Node.ELEMENT_NODE)
- examineNode(item, false);
- }
+ Node item;
+ final int childLength = childNodes.getLength();
+ for (int i = 0; i < childLength; i++) {
+ item = childNodes.item(i);
+ if (item.getNodeType() == Node.ELEMENT_NODE)
+ examineNode(item, false);
}
}
}
diff --git a/hutool-core/src/test/java/cn/hutool/core/net/UrlQueryTest.java b/hutool-core/src/test/java/cn/hutool/core/net/UrlQueryTest.java
index 54ce50a51..9338662a5 100644
--- a/hutool-core/src/test/java/cn/hutool/core/net/UrlQueryTest.java
+++ b/hutool-core/src/test/java/cn/hutool/core/net/UrlQueryTest.java
@@ -130,4 +130,11 @@ public class UrlQueryTest {
final String a = UrlQuery.of(MapUtil.of("a ", " ")).build(CharsetUtil.CHARSET_UTF_8);
Assert.assertEquals("a%20=%20", a);
}
+
+ @Test
+ public void parsePercentTest(){
+ String queryStr = "a%2B=ccc";
+ final UrlQuery query = UrlQuery.of(queryStr, null);
+ Assert.assertEquals(queryStr, query.toString());
+ }
}
diff --git a/hutool-cron/pom.xml b/hutool-cron/pom.xml
index b7f6f5e64..a9a46bf57 100644
--- a/hutool-cron/pom.xml
+++ b/hutool-cron/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-cron
diff --git a/hutool-crypto/pom.xml b/hutool-crypto/pom.xml
index 7f112cfb5..2dc7261d4 100644
--- a/hutool-crypto/pom.xml
+++ b/hutool-crypto/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-crypto
diff --git a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2.java b/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2.java
index b221a1ba8..278ecf1cc 100644
--- a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2.java
+++ b/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2.java
@@ -19,7 +19,9 @@ import org.bouncycastle.crypto.signers.DSAEncoding;
import org.bouncycastle.crypto.signers.PlainDSAEncoding;
import org.bouncycastle.crypto.signers.SM2Signer;
import org.bouncycastle.crypto.signers.StandardDSAEncoding;
+import org.bouncycastle.util.BigIntegers;
+import java.math.BigInteger;
import java.security.PrivateKey;
import java.security.PublicKey;
@@ -519,7 +521,27 @@ public class SM2 extends AbstractAsymmetricCrypto {
* @since 5.5.9
*/
public byte[] getD() {
- return this.privateKeyParams.getD().toByteArray();
+ return BigIntegers.asUnsignedByteArray(getDBigInteger());
+ }
+
+ /**
+ * 获得私钥D值(编码后的私钥)
+ *
+ * @return D值
+ * @since 5.7.17
+ */
+ public String getDHex() {
+ return getDBigInteger().toString(16);
+ }
+
+ /**
+ * 获得私钥D值
+ *
+ * @return D值
+ * @since 5.7.17
+ */
+ public BigInteger getDBigInteger() {
+ return this.privateKeyParams.getD();
}
/**
diff --git a/hutool-crypto/src/test/java/cn/hutool/crypto/test/asymmetric/SM2Test.java b/hutool-crypto/src/test/java/cn/hutool/crypto/test/asymmetric/SM2Test.java
index ffb5e1dbc..3e852793d 100644
--- a/hutool-crypto/src/test/java/cn/hutool/crypto/test/asymmetric/SM2Test.java
+++ b/hutool-crypto/src/test/java/cn/hutool/crypto/test/asymmetric/SM2Test.java
@@ -311,4 +311,14 @@ public class SM2Test {
byte[] dec = sm2.decrypt(data, KeyType.PrivateKey);
Assert.assertArrayEquals(dec, src.getBytes(StandardCharsets.UTF_8));
}
+
+ @Test
+ public void dLengthTest(){
+ final SM2 sm2 = SmUtil.sm2();
+ Assert.assertEquals(64, sm2.getDHex().length());
+ Assert.assertEquals(32, sm2.getD().length);
+
+ // 04占位一个字节
+ Assert.assertEquals(65, sm2.getQ(false).length);
+ }
}
diff --git a/hutool-db/pom.xml b/hutool-db/pom.xml
index 779270085..a1b099c4c 100644
--- a/hutool-db/pom.xml
+++ b/hutool-db/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-db
diff --git a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java b/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
index 0c40d4de2..c18399029 100644
--- a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
+++ b/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
@@ -1,6 +1,7 @@
package cn.hutool.db;
import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.lang.func.Func1;
import cn.hutool.db.dialect.Dialect;
import cn.hutool.db.handler.BeanListHandler;
import cn.hutool.db.handler.EntityHandler;
@@ -20,6 +21,7 @@ import cn.hutool.db.sql.Wrapper;
import javax.sql.DataSource;
import java.io.Serializable;
import java.sql.Connection;
+import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;
@@ -194,6 +196,27 @@ public abstract class AbstractDb implements Serializable {
}
}
+ /**
+ * 执行自定义的{@link PreparedStatement},结果使用{@link RsHandler}处理
+ * 此方法主要用于自定义场景,如游标查询等
+ *
+ * @param 结果集需要处理的对象类型
+ * @param statementFunc 自定义{@link PreparedStatement}创建函数
+ * @param rsh 结果集处理对象
+ * @return 结果对象
+ * @throws SQLException SQL执行异常
+ * @since 5.7.17
+ */
+ public T query(Func1 statementFunc, RsHandler rsh) throws SQLException {
+ Connection conn = null;
+ try {
+ conn = this.getConnection();
+ return SqlExecutor.query(conn, statementFunc, rsh);
+ } finally {
+ this.closeConnection(conn);
+ }
+ }
+
/**
* 执行非查询语句
* 语句包括 插入、更新、删除
diff --git a/hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java b/hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java
index e3aa4439b..eb19816dd 100644
--- a/hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java
+++ b/hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java
@@ -1,6 +1,7 @@
package cn.hutool.db.sql;
import cn.hutool.core.collection.ArrayIter;
+import cn.hutool.core.lang.func.Func1;
import cn.hutool.db.DbUtil;
import cn.hutool.db.StatementUtil;
import cn.hutool.db.handler.RsHandler;
@@ -239,6 +240,22 @@ public class SqlExecutor {
return query(conn, namedSql.getSql(), rsh, namedSql.getParams());
}
+ /**
+ * 执行查询语句
+ * 此方法不会关闭Connection
+ *
+ * @param 处理结果类型
+ * @param conn 数据库连接对象
+ * @param sqlBuilder SQL构建器,包含参数
+ * @param rsh 结果集处理对象
+ * @return 结果对象
+ * @throws SQLException SQL执行异常
+ * @since 5.5.3
+ */
+ public static T query(Connection conn, SqlBuilder sqlBuilder, RsHandler rsh) throws SQLException {
+ return query(conn, sqlBuilder.build(), rsh, sqlBuilder.getParamValueArray());
+ }
+
/**
* 执行查询语句
* 此方法不会关闭Connection
@@ -262,19 +279,30 @@ public class SqlExecutor {
}
/**
- * 执行查询语句
- * 此方法不会关闭Connection
+ * 执行自定义的{@link PreparedStatement},结果使用{@link RsHandler}处理
+ * 此方法主要用于自定义场景,如游标查询等
*
* @param 处理结果类型
* @param conn 数据库连接对象
- * @param sqlBuilder SQL构建器,包含参数
- * @param rsh 结果集处理对象
- * @return 结果对象
+ * @param statementFunc 自定义{@link PreparedStatement}创建函数
+ * @param rsh 自定义结果集处理
+ * @return 结果
* @throws SQLException SQL执行异常
- * @since 5.5.3
+ * @since 5.7.17
*/
- public static T query(Connection conn, SqlBuilder sqlBuilder, RsHandler rsh) throws SQLException {
- return query(conn, sqlBuilder.build(), rsh, sqlBuilder.getParamValueArray());
+ public static T query(Connection conn, Func1 statementFunc, RsHandler rsh) throws SQLException {
+ PreparedStatement ps = null;
+ try {
+ ps = statementFunc.call(conn);
+ return executeQuery(ps, rsh);
+ } catch (Exception e) {
+ if(e instanceof SQLException){
+ throw (SQLException) e;
+ }
+ throw new RuntimeException(e);
+ } finally {
+ DbUtil.close(ps);
+ }
}
// -------------------------------------------------------------------------------------- Execute With PreparedStatement
diff --git a/hutool-db/src/test/java/cn/hutool/db/DbTest.java b/hutool-db/src/test/java/cn/hutool/db/DbTest.java
index 7ab8db26f..1002b602e 100644
--- a/hutool-db/src/test/java/cn/hutool/db/DbTest.java
+++ b/hutool-db/src/test/java/cn/hutool/db/DbTest.java
@@ -1,11 +1,14 @@
package cn.hutool.db;
+import cn.hutool.db.handler.EntityListHandler;
import cn.hutool.db.sql.Condition;
import cn.hutool.log.StaticLog;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
@@ -109,4 +112,18 @@ public class DbTest {
db.del("user", "name", "unitTestUser2");
});
}
+
+ @Test
+ @Ignore
+ public void queryFetchTest() throws SQLException {
+ // https://gitee.com/dromara/hutool/issues/I4JXWN
+ Db.use().query((conn->{
+ PreparedStatement ps = conn.prepareStatement("select * from table",
+ ResultSet.TYPE_FORWARD_ONLY,
+ ResultSet.CONCUR_READ_ONLY);
+ ps.setFetchSize(Integer.MIN_VALUE);
+ ps.setFetchDirection(ResultSet.FETCH_FORWARD);
+ return ps;
+ }), new EntityListHandler());
+ }
}
diff --git a/hutool-dfa/pom.xml b/hutool-dfa/pom.xml
index b6c87f3f3..5f8d7ac31 100644
--- a/hutool-dfa/pom.xml
+++ b/hutool-dfa/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-dfa
diff --git a/hutool-extra/pom.xml b/hutool-extra/pom.xml
index bbc362788..ab54f2ca4 100644
--- a/hutool-extra/pom.xml
+++ b/hutool-extra/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-extra
diff --git a/hutool-extra/src/main/java/cn/hutool/extra/ftp/Ftp.java b/hutool-extra/src/main/java/cn/hutool/extra/ftp/Ftp.java
index f94abd94c..f5b336527 100644
--- a/hutool-extra/src/main/java/cn/hutool/extra/ftp/Ftp.java
+++ b/hutool-extra/src/main/java/cn/hutool/extra/ftp/Ftp.java
@@ -255,6 +255,15 @@ public class Ftp extends AbstractFtp {
return this;
}
+ /**
+ * 是否执行完操作返回当前目录
+ * @return 执行完操作是否返回当前目录
+ * @since 5.7.17
+ */
+ public boolean isBackToPwd(){
+ return this.backToPwd;
+ }
+
/**
* 如果连接超时的话,重新进行连接 经测试,当连接超时时,client.isConnected()仍然返回ture,无法判断是否连接超时 因此,通过发送pwd命令的方式,检查连接是否超时
*
diff --git a/hutool-http/pom.xml b/hutool-http/pom.xml
index 3c35d03d4..0e9067f9f 100644
--- a/hutool-http/pom.xml
+++ b/hutool-http/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-http
diff --git a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java b/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java
index 67a43e027..7f07ff710 100644
--- a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java
+++ b/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java
@@ -12,6 +12,7 @@ import cn.hutool.core.map.MapUtil;
import cn.hutool.core.net.SSLUtil;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.body.BytesBody;
@@ -30,6 +31,7 @@ import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URLStreamHandler;
+import java.nio.charset.Charset;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -43,6 +45,112 @@ import java.util.function.Consumer;
*/
public class HttpRequest extends HttpBase {
+ // ---------------------------------------------------------------- static Http Method start
+
+ /**
+ * POST请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ */
+ public static HttpRequest post(String url) {
+ return of(url).method(Method.POST);
+ }
+
+ /**
+ * GET请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ */
+ public static HttpRequest get(String url) {
+ return of(url).method(Method.GET);
+ }
+
+ /**
+ * HEAD请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ */
+ public static HttpRequest head(String url) {
+ return of(url).method(Method.HEAD);
+ }
+
+ /**
+ * OPTIONS请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ */
+ public static HttpRequest options(String url) {
+ return of(url).method(Method.OPTIONS);
+ }
+
+ /**
+ * PUT请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ */
+ public static HttpRequest put(String url) {
+ return of(url).method(Method.PUT);
+ }
+
+ /**
+ * PATCH请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ * @since 3.0.9
+ */
+ public static HttpRequest patch(String url) {
+ return of(url).method(Method.PATCH);
+ }
+
+ /**
+ * DELETE请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ */
+ public static HttpRequest delete(String url) {
+ return of(url).method(Method.DELETE);
+ }
+
+ /**
+ * TRACE请求
+ *
+ * @param url URL
+ * @return HttpRequest
+ */
+ public static HttpRequest trace(String url) {
+ return of(url).method(Method.TRACE);
+ }
+
+ /**
+ * 构建一个HTTP请求
+ *
+ * @param url URL链接,默认自动编码URL中的参数等信息
+ * @return HttpRequest
+ * @since 5.7.18
+ */
+ public static HttpRequest of(String url) {
+ return of(url, CharsetUtil.CHARSET_UTF_8);
+ }
+
+ /**
+ * 构建一个HTTP请求
+ *
+ * @param url URL链接
+ * @param charset 编码,如果为{@code null}不自动解码编码URL
+ * @return HttpRequest
+ * @since 5.7.18
+ */
+ public static HttpRequest of(String url, Charset charset) {
+ return new HttpRequest(UrlBuilder.of(url, charset));
+ }
+
/**
* 设置全局默认的连接和读取超时时长
*
@@ -85,6 +193,7 @@ public class HttpRequest extends HttpBase {
public static void closeCookie() {
GlobalCookieManager.setCookieManager(null);
}
+ // ---------------------------------------------------------------- static Http Method end
private UrlBuilder url;
private URLStreamHandler urlHandler;
@@ -168,95 +277,16 @@ public class HttpRequest extends HttpBase {
* @param url {@link UrlBuilder}
*/
public HttpRequest(UrlBuilder url) {
- this.url = url;
+ this.url = Assert.notNull(url, "URL must be not null!");
+ // 给定默认URL编码
+ final Charset charset = url.getCharset();
+ if (null != charset) {
+ this.charset(charset);
+ }
// 给定一个默认头信息
this.header(GlobalHeaders.INSTANCE.headers);
}
- // ---------------------------------------------------------------- static Http Method start
-
- /**
- * POST请求
- *
- * @param url URL
- * @return HttpRequest
- */
- public static HttpRequest post(String url) {
- return new HttpRequest(url).method(Method.POST);
- }
-
- /**
- * GET请求
- *
- * @param url URL
- * @return HttpRequest
- */
- public static HttpRequest get(String url) {
- return new HttpRequest(url).method(Method.GET);
- }
-
- /**
- * HEAD请求
- *
- * @param url URL
- * @return HttpRequest
- */
- public static HttpRequest head(String url) {
- return new HttpRequest(url).method(Method.HEAD);
- }
-
- /**
- * OPTIONS请求
- *
- * @param url URL
- * @return HttpRequest
- */
- public static HttpRequest options(String url) {
- return new HttpRequest(url).method(Method.OPTIONS);
- }
-
- /**
- * PUT请求
- *
- * @param url URL
- * @return HttpRequest
- */
- public static HttpRequest put(String url) {
- return new HttpRequest(url).method(Method.PUT);
- }
-
- /**
- * PATCH请求
- *
- * @param url URL
- * @return HttpRequest
- * @since 3.0.9
- */
- public static HttpRequest patch(String url) {
- return new HttpRequest(url).method(Method.PATCH);
- }
-
- /**
- * DELETE请求
- *
- * @param url URL
- * @return HttpRequest
- */
- public static HttpRequest delete(String url) {
- return new HttpRequest(url).method(Method.DELETE);
- }
-
- /**
- * TRACE请求
- *
- * @param url URL
- * @return HttpRequest
- */
- public static HttpRequest trace(String url) {
- return new HttpRequest(url).method(Method.TRACE);
- }
- // ---------------------------------------------------------------- static Http Method end
-
/**
* 获取请求URL
*
diff --git a/hutool-json/pom.xml b/hutool-json/pom.xml
index 70797ce5a..4763c60dd 100644
--- a/hutool-json/pom.xml
+++ b/hutool-json/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-json
diff --git a/hutool-jwt/pom.xml b/hutool-jwt/pom.xml
index 062dd810f..d0168df93 100644
--- a/hutool-jwt/pom.xml
+++ b/hutool-jwt/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-jwt
diff --git a/hutool-log/pom.xml b/hutool-log/pom.xml
index 7cbda2096..7bc307935 100644
--- a/hutool-log/pom.xml
+++ b/hutool-log/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-log
diff --git a/hutool-poi/pom.xml b/hutool-poi/pom.xml
index 3aafbb163..36b919c9b 100644
--- a/hutool-poi/pom.xml
+++ b/hutool-poi/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-poi
diff --git a/hutool-poi/src/main/java/cn/hutool/poi/excel/style/StyleUtil.java b/hutool-poi/src/main/java/cn/hutool/poi/excel/style/StyleUtil.java
index 538f646af..ecb57261f 100644
--- a/hutool-poi/src/main/java/cn/hutool/poi/excel/style/StyleUtil.java
+++ b/hutool-poi/src/main/java/cn/hutool/poi/excel/style/StyleUtil.java
@@ -211,7 +211,7 @@ public class StyleUtil {
* @return 数据格式
* @since 5.5.5
*/
- public Short getFormat(Workbook workbook, String format) {
+ public static Short getFormat(Workbook workbook, String format) {
final DataFormat dataFormat = workbook.createDataFormat();
return dataFormat.getFormat(format);
}
diff --git a/hutool-script/pom.xml b/hutool-script/pom.xml
index 5dd7116ea..0838e2e22 100644
--- a/hutool-script/pom.xml
+++ b/hutool-script/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-script
diff --git a/hutool-setting/pom.xml b/hutool-setting/pom.xml
index e18a4b680..e321133cf 100644
--- a/hutool-setting/pom.xml
+++ b/hutool-setting/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-setting
diff --git a/hutool-socket/pom.xml b/hutool-socket/pom.xml
index 5bca495ab..803824fc3 100644
--- a/hutool-socket/pom.xml
+++ b/hutool-socket/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-socket
diff --git a/hutool-system/pom.xml b/hutool-system/pom.xml
index ec82d73d8..451158989 100644
--- a/hutool-system/pom.xml
+++ b/hutool-system/pom.xml
@@ -9,7 +9,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool-system
diff --git a/pom.xml b/pom.xml
index 431e1a36e..ad2b0a66f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
cn.hutool
hutool-parent
- 5.7.17-SNAPSHOT
+ 5.7.18-SNAPSHOT
hutool
Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。
https://github.com/dromara/hutool