This commit is contained in:
Looly
2021-06-17 18:52:19 +08:00
parent b9cf8b0c5b
commit 5302edf980
3 changed files with 10 additions and 12 deletions

View File

@@ -6,7 +6,6 @@ import cn.hutool.core.bean.copier.ValueProvider;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Editor; import cn.hutool.core.lang.Editor;
import cn.hutool.core.lang.Filter;
import cn.hutool.core.map.CaseInsensitiveMap; import cn.hutool.core.map.CaseInsensitiveMap;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
@@ -198,7 +197,7 @@ public class BeanUtil {
} catch (IntrospectionException e) { } catch (IntrospectionException e) {
throw new BeanException(e); throw new BeanException(e);
} }
return ArrayUtil.filter(beanInfo.getPropertyDescriptors(), (Filter<PropertyDescriptor>) t -> { return ArrayUtil.filter(beanInfo.getPropertyDescriptors(), t -> {
// 过滤掉getClass方法 // 过滤掉getClass方法
return false == "class".equals(t.getName()); return false == "class".equals(t.getName());
}); });

View File

@@ -255,7 +255,7 @@ public class CollUtil {
* @param coll1 集合1 * @param coll1 集合1
* @param coll2 集合2 * @param coll2 集合2
* @param otherColls 其它集合 * @param otherColls 其它集合
* @return 集的集合,返回 {@link ArrayList} * @return 集的集合,返回 {@link ArrayList}
*/ */
@SafeVarargs @SafeVarargs
public static <T> Collection<T> intersection(Collection<T> coll1, Collection<T> coll2, Collection<T>... otherColls) { public static <T> Collection<T> intersection(Collection<T> coll1, Collection<T> coll2, Collection<T>... otherColls) {
@@ -282,7 +282,7 @@ public class CollUtil {
* @param coll1 集合1 * @param coll1 集合1
* @param coll2 集合2 * @param coll2 集合2
* @param otherColls 其它集合 * @param otherColls 其它集合
* @return 集的集合,返回 {@link LinkedHashSet} * @return 集的集合,返回 {@link LinkedHashSet}
* @since 5.3.9 * @since 5.3.9
*/ */
@SafeVarargs @SafeVarargs

View File

@@ -1,15 +1,14 @@
package cn.hutool.cron.pattern; package cn.hutool.cron.pattern;
import cn.hutool.core.date.DateUtil;
import org.junit.Assert;
import org.junit.Test;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import cn.hutool.core.date.DateUtil;
public class CronPatternUtilTest { public class CronPatternUtilTest {
@Test @Test
public void matchedDatesTest() { public void matchedDatesTest() {
//测试每30秒执行 //测试每30秒执行
@@ -21,7 +20,7 @@ public class CronPatternUtilTest {
Assert.assertEquals("2018-10-15 14:35:00", matchedDates.get(3).toString()); Assert.assertEquals("2018-10-15 14:35:00", matchedDates.get(3).toString());
Assert.assertEquals("2018-10-15 14:35:30", matchedDates.get(4).toString()); Assert.assertEquals("2018-10-15 14:35:30", matchedDates.get(4).toString());
} }
@Test @Test
public void matchedDatesTest2() { public void matchedDatesTest2() {
//测试每小时执行 //测试每小时执行
@@ -33,7 +32,7 @@ public class CronPatternUtilTest {
Assert.assertEquals("2018-10-15 18:00:00", matchedDates.get(3).toString()); Assert.assertEquals("2018-10-15 18:00:00", matchedDates.get(3).toString());
Assert.assertEquals("2018-10-15 19:00:00", matchedDates.get(4).toString()); Assert.assertEquals("2018-10-15 19:00:00", matchedDates.get(4).toString());
} }
@Test @Test
public void matchedDatesTest3() { public void matchedDatesTest3() {
//测试最后一天 //测试最后一天