mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix bugs
This commit is contained in:
parent
93951af07e
commit
8e2f63d576
@ -3,13 +3,15 @@
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
## 5.3.6 (2020-06-02)
|
||||
## 5.3.7 (2020-06-03)
|
||||
|
||||
### 新特性
|
||||
* 【core 】 ThreadFactoryBuilder的setUncaughtExceptionHandler返回this(issue#I1J4YJ@Gitee)
|
||||
|
||||
### Bug修复
|
||||
* 【core 】 修复DateUtil.parse解析2020-5-8 3:12:13错误问题(issue#I1IZA3@Gitee)
|
||||
* 【core 】 修复Img.pressImg大小无效问题(issue#I1HSWU@Gitee)
|
||||
* 【core 】 修复CronUtil.stop没有清除任务的问题(issue#I1JACI@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
## 5.3.6 (2020-05-30)
|
||||
|
@ -633,7 +633,8 @@ public class Img implements Serializable {
|
||||
} else {
|
||||
point = new Point(rectangle.x, rectangle.y);
|
||||
}
|
||||
GraphicsUtil.drawImg(g, img, point);
|
||||
rectangle.setLocation(point.x, point.y);
|
||||
GraphicsUtil.drawImg(g, img, rectangle);
|
||||
|
||||
g.dispose();
|
||||
return backgroundImg;
|
||||
|
@ -6,6 +6,7 @@ import org.junit.Test;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.Rectangle;
|
||||
|
||||
public class ImgTest {
|
||||
|
||||
@ -46,4 +47,12 @@ public class ImgTest {
|
||||
1f)
|
||||
.write(FileUtil.file("d:/test/test2_result.png"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void pressImgTest(){
|
||||
Img.from(FileUtil.file("d:/test/图片1.JPG"))
|
||||
.pressImage(ImgUtil.read("d:/test/617180969474805871.jpg"), new Rectangle(0, 0, 800, 800), 1f)
|
||||
.write(FileUtil.file("d:/test/pressImg_result.jpg"));
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
|
||||
package cn.hutool.cron;
|
||||
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import cn.hutool.core.exceptions.UtilException;
|
||||
import cn.hutool.core.io.resource.NoResourceException;
|
||||
import cn.hutool.cron.pattern.CronPattern;
|
||||
@ -11,6 +8,9 @@ import cn.hutool.cron.task.Task;
|
||||
import cn.hutool.setting.Setting;
|
||||
import cn.hutool.setting.SettingRuntimeException;
|
||||
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
/**
|
||||
* 定时任务工具类<br>
|
||||
* 此工具持有一个全局{@link Scheduler},所有定时任务在同一个调度器中执行<br>
|
||||
@ -183,7 +183,7 @@ public class CronUtil {
|
||||
}
|
||||
if (scheduler.isStarted()) {
|
||||
//关闭并清除已有任务
|
||||
scheduler.stop(true);
|
||||
stop();
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
@ -199,7 +199,7 @@ public class CronUtil {
|
||||
* 停止
|
||||
*/
|
||||
public static void stop() {
|
||||
scheduler.stop();
|
||||
scheduler.stop(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ public class Scheduler implements Serializable {
|
||||
* 停止定时任务<br>
|
||||
* 此方法调用后会将定时器进程立即结束,如果为守护线程模式,则正在执行的作业也会自动结束,否则作业线程将在执行完成后结束。
|
||||
*
|
||||
* @param clearTasks 是否清除说有任务
|
||||
* @param clearTasks 是否清除所有任务
|
||||
* @return this
|
||||
* @since 4.1.17
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user