mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix bug
This commit is contained in:
parent
9ba4b008b2
commit
cc6a1cec54
@ -10,6 +10,7 @@
|
|||||||
* 【core 】 FileTypeUtil增加对wps编辑的docx的识别(issue#I47JGH@Gitee)
|
* 【core 】 FileTypeUtil增加对wps编辑的docx的识别(issue#I47JGH@Gitee)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
|
* 【cron 】 **重要**修复Scheduler启动默认线程池为null的bug(issue#I47PZW@Gitee)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@ public class Scheduler implements Serializable {
|
|||||||
try {
|
try {
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
|
||||||
if(null != this.threadExecutor){
|
if(null == this.threadExecutor){
|
||||||
// 无界线程池,确保每一个需要执行的线程都可以及时运行,同时复用已有线程避免线程重复创建
|
// 无界线程池,确保每一个需要执行的线程都可以及时运行,同时复用已有线程避免线程重复创建
|
||||||
this.threadExecutor = ExecutorBuilder.create().useSynchronousQueue().setThreadFactory(//
|
this.threadExecutor = ExecutorBuilder.create().useSynchronousQueue().setThreadFactory(//
|
||||||
ThreadFactoryBuilder.create().setNamePrefix("hutool-cron-").setDaemon(this.daemon).build()//
|
ThreadFactoryBuilder.create().setNamePrefix("hutool-cron-").setDaemon(this.daemon).build()//
|
||||||
|
@ -38,7 +38,7 @@ public class CronTest {
|
|||||||
ThreadUtil.waitForDie();
|
ThreadUtil.waitForDie();
|
||||||
CronUtil.stop();
|
CronUtil.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Ignore
|
||||||
public void cronWithListenerTest() {
|
public void cronWithListenerTest() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user