fix comment

This commit is contained in:
Looly
2021-07-16 01:51:12 +08:00
parent 63b93948a6
commit 0915b8918d
4 changed files with 28 additions and 27 deletions

View File

@@ -18,7 +18,6 @@ import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.Year;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
import java.util.Calendar;
@@ -542,8 +541,8 @@ public class DateUtil extends CalendarUtil {
if (null == format || null == date) {
return null;
}
/// java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: YearOfEra
/// return format.format(date.toInstant());
// java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: YearOfEra
// 出现以上报错时表示Instant时间戳没有时区信息赋予默认时区
return TemporalAccessorUtil.format(date.toInstant(), format);
}

View File

@@ -1544,6 +1544,7 @@ public class ImgUtil {
* @since 3.1.0
*/
public static void write(Image image, File targetFile) throws IORuntimeException {
FileUtil.touch(targetFile);
ImageOutputStream out = null;
try {
out = getImageOutputStream(targetFile);