mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix code
This commit is contained in:
parent
7230b074ac
commit
997f2af8cd
@ -21,7 +21,7 @@ import java.util.zip.Inflater;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link java.util.zip.InflaterInputStream}包装实现,实现"deflate"算法解压<br>
|
* {@link java.util.zip.InflaterInputStream}包装实现,实现"deflate"算法解压<br>
|
||||||
* 参考:org.mina.hc.client5.http.entity.DeflateInputStream
|
* 参考:org.apache.hc.client5.http.entity.DeflateInputStream
|
||||||
*
|
*
|
||||||
* @author looly
|
* @author looly
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@ import java.util.Objects;
|
|||||||
/**
|
/**
|
||||||
* 循环缓冲区
|
* 循环缓冲区
|
||||||
*
|
*
|
||||||
* @author mina commons io
|
* @author Apache-commons-io
|
||||||
*/
|
*/
|
||||||
public class CircularByteBuffer {
|
public class CircularByteBuffer {
|
||||||
private final byte[] buffer;
|
private final byte[] buffer;
|
||||||
|
@ -27,7 +27,7 @@ import java.security.ProtectionDomain;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 类描述工具类<br>
|
* 类描述工具类<br>
|
||||||
* 来自:org.mina.dubbo.common.utils.ReflectUtils<br>
|
* 来自:org.apache.dubbo.common.utils.ReflectUtils<br>
|
||||||
* 在字节码中,类型表示如下:
|
* 在字节码中,类型表示如下:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>byte =》 B</li>
|
* <li>byte =》 B</li>
|
||||||
|
@ -2405,7 +2405,7 @@ public class CharSequenceUtil extends StrValidator {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之
|
* 补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之
|
||||||
* 同:leftPad (org.mina.commons.lang3.leftPad)
|
* 同:leftPad (org.apache.commons.lang3.leftPad)
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* padPre(null, *, *);//null
|
* padPre(null, *, *);//null
|
||||||
@ -2436,7 +2436,7 @@ public class CharSequenceUtil extends StrValidator {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 补充字符串以满足最小长度,如果提供的字符串大于指定长度,截断之
|
* 补充字符串以满足最小长度,如果提供的字符串大于指定长度,截断之
|
||||||
* 同:leftPad (org.mina.commons.lang3.leftPad)
|
* 同:leftPad (org.apache.commons.lang3.leftPad)
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* padPre(null, *, *);//null
|
* padPre(null, *, *);//null
|
||||||
|
@ -44,7 +44,7 @@ public class DocumentBuilderUtil {
|
|||||||
/**
|
/**
|
||||||
* 创建{@link DocumentBuilderFactory}
|
* 创建{@link DocumentBuilderFactory}
|
||||||
* <p>
|
* <p>
|
||||||
* 默认使用"com.sun.org.mina.xerces.internal.jaxp.DocumentBuilderFactoryImpl"<br>
|
* 默认使用"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"<br>
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param namespaceAware 是否打开命名空间支持
|
* @param namespaceAware 是否打开命名空间支持
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Arrays;
|
|||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来自:org.mina.dubbo.common.utils.ClassDescUtilTest
|
* 来自:org.apache.dubbo.common.utils.ClassDescUtilTest
|
||||||
*/
|
*/
|
||||||
public class ClassDescTest {
|
public class ClassDescTest {
|
||||||
|
|
||||||
|
@ -55,11 +55,11 @@ public interface DriverNamePool {
|
|||||||
/**
|
/**
|
||||||
* JDBC 驱动 Hive
|
* JDBC 驱动 Hive
|
||||||
*/
|
*/
|
||||||
String DRIVER_HIVE = "org.mina.hadoop.hive.jdbc.HiveDriver";
|
String DRIVER_HIVE = "org.apache.hadoop.hive.jdbc.HiveDriver";
|
||||||
/**
|
/**
|
||||||
* JDBC 驱动 Hive2
|
* JDBC 驱动 Hive2
|
||||||
*/
|
*/
|
||||||
String DRIVER_HIVE2 = "org.mina.hive.jdbc.HiveDriver";
|
String DRIVER_HIVE2 = "org.apache.hive.jdbc.HiveDriver";
|
||||||
/**
|
/**
|
||||||
* JDBC 驱动 H2
|
* JDBC 驱动 H2
|
||||||
*/
|
*/
|
||||||
@ -67,7 +67,7 @@ public interface DriverNamePool {
|
|||||||
/**
|
/**
|
||||||
* JDBC 驱动 Derby
|
* JDBC 驱动 Derby
|
||||||
*/
|
*/
|
||||||
String DRIVER_DERBY = "org.mina.derby.jdbc.AutoloadedDriver";
|
String DRIVER_DERBY = "org.apache.derby.jdbc.AutoloadedDriver";
|
||||||
/**
|
/**
|
||||||
* JDBC 驱动 HSQLDB
|
* JDBC 驱动 HSQLDB
|
||||||
*/
|
*/
|
||||||
@ -83,7 +83,7 @@ public interface DriverNamePool {
|
|||||||
/**
|
/**
|
||||||
* JDBC 驱动 Ignite thin
|
* JDBC 驱动 Ignite thin
|
||||||
*/
|
*/
|
||||||
String DRIVER_IGNITE_THIN = "org.mina.ignite.IgniteJdbcThinDriver";
|
String DRIVER_IGNITE_THIN = "org.apache.ignite.IgniteJdbcThinDriver";
|
||||||
/**
|
/**
|
||||||
* JDBC 驱动 ClickHouse
|
* JDBC 驱动 ClickHouse
|
||||||
*/
|
*/
|
||||||
@ -103,7 +103,7 @@ public interface DriverNamePool {
|
|||||||
/**
|
/**
|
||||||
* JDBC 驱动 Apache Phoenix
|
* JDBC 驱动 Apache Phoenix
|
||||||
*/
|
*/
|
||||||
String DRIVER_PHOENIX = "org.mina.phoenix.jdbc.PhoenixDriver";
|
String DRIVER_PHOENIX = "org.apache.phoenix.jdbc.PhoenixDriver";
|
||||||
/**
|
/**
|
||||||
* JDBC 驱动 华为高斯
|
* JDBC 驱动 华为高斯
|
||||||
*/
|
*/
|
||||||
|
@ -113,7 +113,7 @@ public class Ftp extends AbstractFtp {
|
|||||||
* @param password 密码
|
* @param password 密码
|
||||||
* @param charset 编码
|
* @param charset 编码
|
||||||
* @param serverLanguageCode 服务器语言 例如:zh
|
* @param serverLanguageCode 服务器语言 例如:zh
|
||||||
* @param systemKey 服务器标识 例如:org.mina.commons.net.ftp.FTPClientConfig.SYST_NT
|
* @param systemKey 服务器标识 例如:org.apache.commons.net.ftp.FTPClientConfig.SYST_NT
|
||||||
*/
|
*/
|
||||||
public Ftp(final String host, final int port, final String user, final String password, final Charset charset, final String serverLanguageCode, final String systemKey) {
|
public Ftp(final String host, final int port, final String user, final String password, final Charset charset, final String serverLanguageCode, final String systemKey) {
|
||||||
this(host, port, user, password, charset, serverLanguageCode, systemKey, null);
|
this(host, port, user, password, charset, serverLanguageCode, systemKey, null);
|
||||||
|
@ -134,7 +134,7 @@ public class VelocityEngine implements TemplateEngine {
|
|||||||
// loader
|
// loader
|
||||||
switch (config.getResourceMode()) {
|
switch (config.getResourceMode()) {
|
||||||
case CLASSPATH:
|
case CLASSPATH:
|
||||||
ve.setProperty("resource.loader.file.class", "org.mina.velocity.runtime.resource.loader.ClasspathResourceLoader");
|
ve.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
|
||||||
break;
|
break;
|
||||||
case FILE:
|
case FILE:
|
||||||
// path
|
// path
|
||||||
@ -145,7 +145,7 @@ public class VelocityEngine implements TemplateEngine {
|
|||||||
break;
|
break;
|
||||||
case WEB_ROOT:
|
case WEB_ROOT:
|
||||||
ve.setProperty(Velocity.RESOURCE_LOADERS, "webapp");
|
ve.setProperty(Velocity.RESOURCE_LOADERS, "webapp");
|
||||||
ve.setProperty("webapp.resource.loader.class", "org.mina.velocity.tools.view.servlet.WebappLoader");
|
ve.setProperty("webapp.resource.loader.class", "org.apache.velocity.tools.view.servlet.WebappLoader");
|
||||||
ve.setProperty("webapp.resource.loader.path", ObjUtil.defaultIfNull(config.getPath(), StrUtil.SLASH));
|
ve.setProperty("webapp.resource.loader.path", ObjUtil.defaultIfNull(config.getPath(), StrUtil.SLASH));
|
||||||
break;
|
break;
|
||||||
case STRING:
|
case STRING:
|
||||||
|
@ -136,7 +136,7 @@ public class Log4j2Log extends AbstractLog {
|
|||||||
* 此方法用于兼容底层日志实现,通过传入当前包装类名,以解决打印日志中行号错误问题
|
* 此方法用于兼容底层日志实现,通过传入当前包装类名,以解决打印日志中行号错误问题
|
||||||
*
|
*
|
||||||
* @param fqcn 完全限定类名(Fully Qualified Class Name),用于纠正定位错误行号
|
* @param fqcn 完全限定类名(Fully Qualified Class Name),用于纠正定位错误行号
|
||||||
* @param level 日志级别,使用org.mina.logging.log4j.Level中的常量
|
* @param level 日志级别,使用org.apache.logging.log4j.Level中的常量
|
||||||
* @param t 异常
|
* @param t 异常
|
||||||
* @param msgTemplate 消息模板
|
* @param msgTemplate 消息模板
|
||||||
* @param arguments 参数
|
* @param arguments 参数
|
||||||
|
@ -187,7 +187,7 @@ public class ExcelSaxUtil {
|
|||||||
try {
|
try {
|
||||||
xmlReader = XMLHelper.newXMLReader();
|
xmlReader = XMLHelper.newXMLReader();
|
||||||
} catch (final SAXException | ParserConfigurationException e) {
|
} catch (final SAXException | ParserConfigurationException e) {
|
||||||
if (e.getMessage().contains("org.mina.xerces.parsers.SAXParser")) {
|
if (e.getMessage().contains("org.apache.xerces.parsers.SAXParser")) {
|
||||||
throw new DependencyException(e, "You need to add 'xerces:xercesImpl' to your project and version >= 2.11.0");
|
throw new DependencyException(e, "You need to add 'xerces:xercesImpl' to your project and version >= 2.11.0");
|
||||||
} else {
|
} else {
|
||||||
throw new POIException(e);
|
throw new POIException(e);
|
||||||
|
@ -12,11 +12,12 @@
|
|||||||
|
|
||||||
package org.dromara.hutool.poi.excel;
|
package org.dromara.hutool.poi.excel;
|
||||||
|
|
||||||
import org.dromara.hutool.poi.excel.cell.values.NumericCellValue;
|
|
||||||
import java.util.Date;
|
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
|
import org.dromara.hutool.poi.excel.cell.values.NumericCellValue;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
public class NumericCellValueTest {
|
public class NumericCellValueTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -25,7 +26,7 @@ public class NumericCellValueTest {
|
|||||||
final ExcelWriter writer = ExcelUtil.getWriter("1899bug_write.xlsx");
|
final ExcelWriter writer = ExcelUtil.getWriter("1899bug_write.xlsx");
|
||||||
final Cell cell = reader.getCell(0, 0);
|
final Cell cell = reader.getCell(0, 0);
|
||||||
// 直接取值
|
// 直接取值
|
||||||
// 和CellUtil.getCellValue(org.mina.poi.ss.usermodel.Cell)方法的结果一样
|
// 和CellUtil.getCellValue(org.apache.poi.ss.usermodel.Cell)方法的结果一样
|
||||||
// 1899-12-31 04:39:00
|
// 1899-12-31 04:39:00
|
||||||
final Date cellValue = cell.getDateCellValue();
|
final Date cellValue = cell.getDateCellValue();
|
||||||
// 将这个值写入EXCEL中自定义样式的单元格,结果会是-1
|
// 将这个值写入EXCEL中自定义样式的单元格,结果会是-1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user