mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines
EclipseJdt cleanup 'RemoveAllTrailingWhitespace' applied by erefactor. For EclipseJdt see https://www.eclipse.org/eclipse/news/4.18/jdt.php For erefactor see https://github.com/cal101/erefactor
This commit is contained in:
parent
65d60a79fe
commit
b1ca1aed08
@ -7,13 +7,13 @@ import cn.hutool.core.util.ArrayUtil;
|
||||
/**
|
||||
* 日期修改器<br>
|
||||
* 用于实现自定义某个日期字段的调整,包括:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* 1. 获取指定字段的起始时间
|
||||
* 2. 获取指定字段的四舍五入时间
|
||||
* 3. 获取指定字段的结束时间
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
@ -31,7 +31,7 @@ public class DateModifier {
|
||||
|
||||
/**
|
||||
* 修改日期
|
||||
*
|
||||
*
|
||||
* @param calendar {@link Calendar}
|
||||
* @param dateField 日期字段,即保留到哪个日期字段
|
||||
* @param modifyType 修改类型,包括舍去、四舍五入、进一等
|
||||
@ -87,7 +87,7 @@ public class DateModifier {
|
||||
// -------------------------------------------------------------------------------------------------- Private method start
|
||||
/**
|
||||
* 修改日期字段值
|
||||
*
|
||||
*
|
||||
* @param calendar {@link Calendar}
|
||||
* @param field 字段,见{@link Calendar}
|
||||
* @param modifyType {@link ModifyType}
|
||||
@ -125,7 +125,7 @@ public class DateModifier {
|
||||
|
||||
/**
|
||||
* 修改类型
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 日期范围
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.1.0
|
||||
*/
|
||||
@ -15,7 +15,7 @@ public class DateRange extends Range<DateTime> {
|
||||
|
||||
/**
|
||||
* 构造,包含开始和结束日期时间
|
||||
*
|
||||
*
|
||||
* @param start 起始日期时间
|
||||
* @param end 结束日期时间
|
||||
* @param unit 步进单位
|
||||
@ -26,7 +26,7 @@ public class DateRange extends Range<DateTime> {
|
||||
|
||||
/**
|
||||
* 构造,包含开始和结束日期时间
|
||||
*
|
||||
*
|
||||
* @param start 起始日期时间
|
||||
* @param end 结束日期时间
|
||||
* @param unit 步进单位
|
||||
@ -38,7 +38,7 @@ public class DateRange extends Range<DateTime> {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param start 起始日期时间
|
||||
* @param end 结束日期时间
|
||||
* @param unit 步进单位
|
||||
|
@ -2,12 +2,12 @@ package cn.hutool.core.date;
|
||||
|
||||
/**
|
||||
* 季度枚举
|
||||
*
|
||||
*
|
||||
* @see #Q1
|
||||
* @see #Q2
|
||||
* @see #Q3
|
||||
* @see #Q4
|
||||
*
|
||||
*
|
||||
* @author zhfish(https://github.com/zhfish)
|
||||
*
|
||||
*/
|
||||
@ -21,7 +21,7 @@ public enum Quarter {
|
||||
Q3(3),
|
||||
/** 第四季度 */
|
||||
Q4(4);
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
private final int value;
|
||||
|
||||
@ -35,12 +35,12 @@ public enum Quarter {
|
||||
|
||||
/**
|
||||
* 将 季度int转换为Season枚举对象<br>
|
||||
*
|
||||
*
|
||||
* @see #Q1
|
||||
* @see #Q2
|
||||
* @see #Q3
|
||||
* @see #Q4
|
||||
*
|
||||
*
|
||||
* @param intValue 季度int表示
|
||||
* @return {@link Quarter}
|
||||
*/
|
||||
|
@ -11,12 +11,12 @@ import java.util.concurrent.TimeUnit;
|
||||
* System.currentTimeMillis()的调用比new一个普通对象要耗时的多(具体耗时高出多少我还没测试过,有人说是100倍左右)
|
||||
* System.currentTimeMillis()之所以慢是因为去跟系统打了一次交道
|
||||
* 后台定时更新时钟,JVM退出时,线程自动回收
|
||||
*
|
||||
*
|
||||
* see: http://git.oschina.net/yu120/sequence
|
||||
* @author lry,looly
|
||||
*/
|
||||
public class SystemClock {
|
||||
|
||||
|
||||
/** 时钟更新间隔,单位毫秒 */
|
||||
private final long period;
|
||||
/** 现在时刻的毫秒数 */
|
||||
@ -50,7 +50,7 @@ public class SystemClock {
|
||||
private long currentTimeMillis() {
|
||||
return now;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------ static
|
||||
/**
|
||||
* 单例
|
||||
|
@ -5,7 +5,7 @@ import java.util.Calendar;
|
||||
/**
|
||||
* 星期枚举<br>
|
||||
* 与Calendar中的星期int值对应
|
||||
*
|
||||
*
|
||||
* @see #SUNDAY
|
||||
* @see #MONDAY
|
||||
* @see #TUESDAY
|
||||
@ -13,7 +13,7 @@ import java.util.Calendar;
|
||||
* @see #THURSDAY
|
||||
* @see #FRIDAY
|
||||
* @see #SATURDAY
|
||||
*
|
||||
*
|
||||
* @author Looly
|
||||
*
|
||||
*/
|
||||
@ -40,7 +40,7 @@ public enum Week {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param value 星期对应{@link Calendar} 中的Week值
|
||||
*/
|
||||
Week(int value) {
|
||||
@ -49,16 +49,16 @@ public enum Week {
|
||||
|
||||
/**
|
||||
* 获得星期对应{@link Calendar} 中的Week值
|
||||
*
|
||||
*
|
||||
* @return 星期对应{@link Calendar} 中的Week值
|
||||
*/
|
||||
public int getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 转换为中文名
|
||||
*
|
||||
*
|
||||
* @return 星期的中文名
|
||||
* @since 3.3.0
|
||||
*/
|
||||
@ -68,7 +68,7 @@ public enum Week {
|
||||
|
||||
/**
|
||||
* 转换为中文名
|
||||
*
|
||||
*
|
||||
* @param weekNamePre 表示星期的前缀,例如前缀为“星期”,则返回结果为“星期一”;前缀为”周“,结果为“周一”
|
||||
* @return 星期的中文名
|
||||
* @since 4.0.11
|
||||
@ -96,7 +96,7 @@ public enum Week {
|
||||
|
||||
/**
|
||||
* 将 {@link Calendar}星期相关值转换为Week枚举对象<br>
|
||||
*
|
||||
*
|
||||
* @see #SUNDAY
|
||||
* @see #MONDAY
|
||||
* @see #TUESDAY
|
||||
@ -104,7 +104,7 @@ public enum Week {
|
||||
* @see #THURSDAY
|
||||
* @see #FRIDAY
|
||||
* @see #SATURDAY
|
||||
*
|
||||
*
|
||||
* @param calendarWeekIntValue Calendar中关于Week的int值
|
||||
* @return {@link Week}
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 星座 来自:https://blog.csdn.net/u010758605/article/details/48317881
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.4.3
|
||||
*/
|
||||
@ -19,7 +19,7 @@ public class Zodiac {
|
||||
|
||||
/**
|
||||
* 通过生日计算星座
|
||||
*
|
||||
*
|
||||
* @param date 出生日期
|
||||
* @return 星座名
|
||||
*/
|
||||
@ -29,7 +29,7 @@ public class Zodiac {
|
||||
|
||||
/**
|
||||
* 通过生日计算星座
|
||||
*
|
||||
*
|
||||
* @param calendar 出生日期
|
||||
* @return 星座名
|
||||
*/
|
||||
@ -39,10 +39,10 @@ public class Zodiac {
|
||||
}
|
||||
return getZodiac(calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过生日计算星座
|
||||
*
|
||||
*
|
||||
* @param month 月,从0开始计数
|
||||
* @param day 天
|
||||
* @return 星座名
|
||||
@ -54,7 +54,7 @@ public class Zodiac {
|
||||
|
||||
/**
|
||||
* 通过生日计算星座
|
||||
*
|
||||
*
|
||||
* @param month 月,从0开始计数,见{@link Month#getValue()}
|
||||
* @param day 天
|
||||
* @return 星座名
|
||||
@ -67,7 +67,7 @@ public class Zodiac {
|
||||
// ----------------------------------------------------------------------------------------------------------- 生肖
|
||||
/**
|
||||
* 通过生日计算生肖,只计算1900年后出生的人
|
||||
*
|
||||
*
|
||||
* @param date 出生日期(年需农历)
|
||||
* @return 星座名
|
||||
*/
|
||||
@ -77,7 +77,7 @@ public class Zodiac {
|
||||
|
||||
/**
|
||||
* 通过生日计算生肖,只计算1900年后出生的人
|
||||
*
|
||||
*
|
||||
* @param calendar 出生日期(年需农历)
|
||||
* @return 星座名
|
||||
*/
|
||||
@ -90,7 +90,7 @@ public class Zodiac {
|
||||
|
||||
/**
|
||||
* 计算生肖,只计算1900年后出生的人
|
||||
*
|
||||
*
|
||||
* @param year 农历年
|
||||
* @return 生肖名
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 农历相关类汇总,包括农历月、天干地支、农历节日、24节气等
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -6,14 +6,14 @@ import java.util.TimeZone;
|
||||
|
||||
public abstract class AbstractDateBasic implements DateBasic, Serializable {
|
||||
private static final long serialVersionUID = 6333136319870641818L;
|
||||
|
||||
|
||||
/** The pattern */
|
||||
protected final String pattern;
|
||||
/** The time zone. */
|
||||
protected final TimeZone timeZone;
|
||||
/** The locale. */
|
||||
protected final Locale locale;
|
||||
|
||||
|
||||
/**
|
||||
* 构造,内部使用
|
||||
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
|
||||
|
@ -5,7 +5,7 @@ import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* 日期基本信息获取接口
|
||||
*
|
||||
*
|
||||
* @author Looly
|
||||
* @since 2.16.2
|
||||
*/
|
||||
@ -13,21 +13,21 @@ public interface DateBasic {
|
||||
|
||||
/**
|
||||
* 获得日期格式化或者转换的格式
|
||||
*
|
||||
*
|
||||
* @return {@link java.text.SimpleDateFormat}兼容的格式
|
||||
*/
|
||||
String getPattern();
|
||||
|
||||
/**
|
||||
* 获得时区
|
||||
*
|
||||
*
|
||||
* @return {@link TimeZone}
|
||||
*/
|
||||
TimeZone getTimeZone();
|
||||
|
||||
/**
|
||||
* 获得 日期地理位置
|
||||
*
|
||||
*
|
||||
* @return {@link Locale}
|
||||
*/
|
||||
Locale getLocale();
|
||||
|
@ -15,7 +15,7 @@ public interface DateParser extends DateBasic{
|
||||
/**
|
||||
* 将日期字符串解析并转换为 {@link Date} 对象<br>
|
||||
* 等价于 {@link java.text.DateFormat#parse(String)}
|
||||
*
|
||||
*
|
||||
* @param source 日期字符串
|
||||
* @return {@link Date}
|
||||
* @throws ParseException 转换异常,被转换的字符串格式错误。
|
||||
@ -25,7 +25,7 @@ public interface DateParser extends DateBasic{
|
||||
/**
|
||||
* 将日期字符串解析并转换为 {@link Date} 对象<br>
|
||||
* 等价于 {@link java.text.DateFormat#parse(String, ParsePosition)}
|
||||
*
|
||||
*
|
||||
* @param source 日期字符串
|
||||
* @param pos {@link ParsePosition}
|
||||
* @return {@link Date}
|
||||
@ -34,8 +34,8 @@ public interface DateParser extends DateBasic{
|
||||
|
||||
/**
|
||||
* 根据给定格式转换日期字符串
|
||||
* Updates the Calendar with parsed fields. Upon success, the ParsePosition index is updated to indicate how much of the source text was consumed.
|
||||
* Not all source text needs to be consumed.
|
||||
* Updates the Calendar with parsed fields. Upon success, the ParsePosition index is updated to indicate how much of the source text was consumed.
|
||||
* Not all source text needs to be consumed.
|
||||
* Upon parse failure, ParsePosition error index is updated to the offset of the source text which does not match the supplied format.
|
||||
*
|
||||
* @param source 被转换的日期字符串
|
||||
@ -48,7 +48,7 @@ public interface DateParser extends DateBasic{
|
||||
|
||||
/**
|
||||
* 将日期字符串解析并转换为 {@link Date} 对象<br>
|
||||
*
|
||||
*
|
||||
* @param source A <code>String</code> whose beginning should be parsed.
|
||||
* @return a <code>java.util.Date</code> object
|
||||
* @throws ParseException if the beginning of the specified string cannot be parsed.
|
||||
@ -58,7 +58,7 @@ public interface DateParser extends DateBasic{
|
||||
|
||||
/**
|
||||
* 根据 {@link ParsePosition} 给定将日期字符串解析并转换为 {@link Date} 对象<br>
|
||||
*
|
||||
*
|
||||
* @param source A <code>String</code> whose beginning should be parsed.
|
||||
* @param pos the parse position
|
||||
* @return a <code>java.util.Date</code> object
|
||||
|
@ -22,7 +22,7 @@ import java.util.TimeZone;
|
||||
* {@link #getTimeInstance(int, TimeZone, Locale)}<br>
|
||||
* {@link #getDateTimeInstance(int, int, TimeZone, Locale)}
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* Thanks to Apache Commons Lang 3.5
|
||||
* @since 2.16.2
|
||||
*/
|
||||
@ -51,7 +51,7 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
|
||||
// -----------------------------------------------------------------------
|
||||
/**
|
||||
* 获得 FastDateFormat实例,使用默认格式和地区
|
||||
*
|
||||
*
|
||||
* @return FastDateFormat
|
||||
*/
|
||||
public static FastDateFormat getInstance() {
|
||||
@ -61,7 +61,7 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
|
||||
/**
|
||||
* 获得 FastDateFormat 实例,使用默认地区<br>
|
||||
* 支持缓存
|
||||
*
|
||||
*
|
||||
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
|
||||
* @return FastDateFormat
|
||||
* @throws IllegalArgumentException 日期格式问题
|
||||
@ -73,7 +73,7 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
|
||||
/**
|
||||
* 获得 FastDateFormat 实例<br>
|
||||
* 支持缓存
|
||||
*
|
||||
*
|
||||
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
|
||||
* @param timeZone 时区{@link TimeZone}
|
||||
* @return FastDateFormat
|
||||
@ -99,7 +99,7 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
|
||||
/**
|
||||
* 获得 FastDateFormat 实例<br>
|
||||
* 支持缓存
|
||||
*
|
||||
*
|
||||
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
|
||||
* @param timeZone 时区{@link TimeZone}
|
||||
* @param locale {@link Locale} 日期地理位置
|
||||
|
@ -22,7 +22,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
*/
|
||||
public class FastDatePrinter extends AbstractDateBasic implements DatePrinter {
|
||||
private static final long serialVersionUID = -6305750172255764887L;
|
||||
|
||||
|
||||
/** 规则列表. */
|
||||
private transient Rule[] rules;
|
||||
/** 估算最大长度. */
|
||||
@ -32,7 +32,7 @@ public class FastDatePrinter extends AbstractDateBasic implements DatePrinter {
|
||||
// -----------------------------------------------------------------------
|
||||
/**
|
||||
* 构造,内部使用<br>
|
||||
*
|
||||
*
|
||||
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
|
||||
* @param timeZone 非空时区{@link TimeZone}
|
||||
* @param locale 非空{@link Locale} 日期地理位置
|
||||
@ -289,7 +289,7 @@ public class FastDatePrinter extends AbstractDateBasic implements DatePrinter {
|
||||
* <p>
|
||||
* Formats a {@code Date}, {@code Calendar} or {@code Long} (milliseconds) object.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @param obj the object to format
|
||||
* @return The formatted value.
|
||||
*/
|
||||
@ -347,10 +347,10 @@ public class FastDatePrinter extends AbstractDateBasic implements DatePrinter {
|
||||
}
|
||||
return applyRules(calendar, buf);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a String representation of the given Calendar by applying the rules of this printer to it.
|
||||
*
|
||||
*
|
||||
* @param c the Calender to apply the rules to.
|
||||
* @return a String representation of the given Calendar.
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
/**
|
||||
* 日期格式化器缓存<br>
|
||||
* Thanks to Apache Commons Lang 3.5
|
||||
*
|
||||
*
|
||||
* @since 2.16.2
|
||||
*/
|
||||
abstract class FormatCache<F extends Format> {
|
||||
@ -38,7 +38,7 @@ abstract class FormatCache<F extends Format> {
|
||||
|
||||
/**
|
||||
* 使用 pattern, time zone and locale 获得对应的 格式化器
|
||||
*
|
||||
*
|
||||
* @param pattern 非空日期格式,使用与 {@link java.text.SimpleDateFormat}相同格式
|
||||
* @param timeZone 时区,默认当前时区
|
||||
* @param locale 地区,默认使用当前地区
|
||||
@ -69,7 +69,7 @@ abstract class FormatCache<F extends Format> {
|
||||
|
||||
/**
|
||||
* 创建格式化器
|
||||
*
|
||||
*
|
||||
* @param pattern 非空日期格式,使用与 {@link java.text.SimpleDateFormat}相同格式
|
||||
* @param timeZone 时区,默认当前时区
|
||||
* @param locale 地区,默认使用当前地区
|
||||
@ -82,7 +82,7 @@ abstract class FormatCache<F extends Format> {
|
||||
* <p>
|
||||
* Gets a date/time formatter instance using the specified style, time zone and locale.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT, null indicates no date in format
|
||||
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT, null indicates no time in format
|
||||
* @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale
|
||||
@ -103,7 +103,7 @@ abstract class FormatCache<F extends Format> {
|
||||
* <p>
|
||||
* Gets a date/time formatter instance using the specified style, time zone and locale.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
|
||||
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
|
||||
* @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale
|
||||
@ -120,7 +120,7 @@ abstract class FormatCache<F extends Format> {
|
||||
* <p>
|
||||
* Gets a date formatter instance using the specified style, time zone and locale.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
|
||||
* @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale
|
||||
* @param locale optional locale, overrides system locale
|
||||
@ -136,7 +136,7 @@ abstract class FormatCache<F extends Format> {
|
||||
* <p>
|
||||
* Gets a time formatter instance using the specified style, time zone and locale.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
|
||||
* @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale
|
||||
* @param locale optional locale, overrides system locale
|
||||
@ -152,7 +152,7 @@ abstract class FormatCache<F extends Format> {
|
||||
* <p>
|
||||
* Gets a date/time format for the specified styles and locale.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT, null indicates no date in format
|
||||
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT, null indicates no time in format
|
||||
* @param locale The non-null locale of the desired format
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 提供线程安全的日期格式的格式化和解析实现
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 日期封装,日期的核心为DateTime类,DateUtil提供日期操作的入口
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* 依赖异常
|
||||
*
|
||||
*
|
||||
* @author xiaoleilu
|
||||
* @since 4.0.10
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* 未初始化异常
|
||||
*
|
||||
*
|
||||
* @author xiaoleilu
|
||||
*/
|
||||
public class NotInitedException extends RuntimeException {
|
||||
|
@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* 带有状态码的异常
|
||||
*
|
||||
*
|
||||
* @author xiaoleilu
|
||||
*
|
||||
*/
|
||||
|
@ -12,19 +12,19 @@ public class UtilException extends RuntimeException{
|
||||
public UtilException(Throwable e) {
|
||||
super(ExceptionUtil.getMessage(e), e);
|
||||
}
|
||||
|
||||
|
||||
public UtilException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
|
||||
public UtilException(String messageTemplate, Object... params) {
|
||||
super(StrUtil.format(messageTemplate, params));
|
||||
}
|
||||
|
||||
|
||||
public UtilException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
|
||||
public UtilException(Throwable throwable, String messageTemplate, Object... params) {
|
||||
super(StrUtil.format(messageTemplate, params), throwable);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* 验证异常
|
||||
*
|
||||
*
|
||||
* @author xiaoleilu
|
||||
*/
|
||||
public class ValidateException extends StatefulException {
|
||||
@ -16,7 +16,7 @@ public class ValidateException extends StatefulException {
|
||||
public ValidateException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
|
||||
public ValidateException(String messageTemplate, Object... params) {
|
||||
super(StrUtil.format(messageTemplate, params));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user