Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Releases: ifeilong/feilong-core

1.7.0

12 Jun 07:45
Compare
Choose a tag to compare

[Feature]

  • none

[Update]

  • ClassLoaderUtil
    URL getResource(ClassLoader classLoader,String resourceName)
    URL getRootClassPath(ClassLoader classLoader)
    ClassLoader getClassLoaderByCurrentThread()
    friendly
  • DateExtensionUtil
    int getIntervalMinute(long spaceMilliseconds)
    int getIntervalSecond(long spaceMilliseconds)
    int getIntervalHour(long spaceMilliseconds)
    int getIntervalDay(long spaceMilliseconds)
    friendly
  • make CalendarUtil friendly

[Remove]

remove @Deprecated method

  • Slf4jUtil String formatMessage(String messagePattern,Object...args)
  • DateUtil Date string2Date(String dateString,String datePattern)
  • DateUtil String date2String(Date date,String datePattern)

DateUtil

  • remove boolean isBefore(String dateString,String whenDateString,String datePattern)
  • remove boolean isInTime(Date date,String beginTime,String endTime,String datePattern)

DateExtensionUtil

  • remove List<Date> getIntervalDayList(String fromDateString,String toDateString,String datePattern)
  • remove int getIntervalWeek(String date1,String date2,String datePattern)
  • remove int getIntervalDay(String date1,String date2,String datePattern)

NumberUtil

  • remove BigDecimal getMultiplyValue(Number one,Number two)

[Fix Bug] πŸ›

  • none

1.6.3

12 Jun 04:36
Compare
Choose a tag to compare

[Feature]

MapUtil

  • add void putAllIfNotNull(final Map<K, V> map,Map<? extends K, ? extends V> m)
  • add void putIfValueNotNullOrEmpty(final Map<K, V> map,final K key,final V value)

CollectionsUtil

  • add boolean addAllIgnoreNull(final Collection<O> objectCollection,final Iterable<? extends O> iterable)

[Update]

PropertyUtil

  • rename boolean isCannotFindType(Object obj) to boolean isDonotSupportFindType(Object obj)

ClassUtil

  • change boolean isInstanceAnyClass(Object obj,Class<?>[] klasses) to boolean isInstanceAnyClass(Object obj,Class<?>...klasses)

[Remove]

ResourceBundleUtil

  • remove Map<String, String> readPrefixAsMap(String baseName,String prefix,String delimiters,Locale locale)

JsonUtil

  • remove JsonConfig defaultIfNull(JsonConfig jsonConfig) call ObjectUtils.defaultIfNull

[Fix Bug] πŸ›

  • none

1.6.2

09 Jun 22:32
Compare
Choose a tag to compare

[Feature]

MapUtil

  • add Map<K, String> toSingleValueMap(Map<K, String[]> arrayValueMap)
  • add Map<K, V[]> toArrayValueMap(Map<K, V> singleValueMap)
  • add Map<K, List<V>> putMultiValue(Map<K, List<V>> map,K key,V value)

[Update]

CollectionsUtil

  • update Map<String, BigDecimal> sum(Collection<O> objectCollection,Predicate<O> includePredicate,String...propertyNames) to Map<String, BigDecimal> sum(Collection<O> objectCollection,String[] propertyNames,Predicate<O> includePredicate)
  • update BigDecimal avg(Collection<O> objectCollection,int scale,String propertyName) to BigDecimal avg(Collection<O> objectCollection,String propertyName,int scale)
  • update Map<String, BigDecimal> avg(Collection<O> objectCollection,int scale,String...propertyNames) to Map<String, BigDecimal> avg(Collection<O> objectCollection,String[] propertyNames,int scale)
  • update Map<T, Integer> groupCount(Collection<O> objectCollection,Predicate<O> includePredicate,String propertyName) to Map<T, Integer> groupCount(Collection<O> objectCollection,String propertyName,Predicate<O> includePredicate)

ClassLoaderUtil

  • rename URL getClassPath(ClassLoader classLoader) to URL getRootClassPath(ClassLoader classLoader)
  • rename URL getClassPath() to URL getRootClassPath()
  • rename URL getResource(String resourceName,Class<?> callingClass) to URL getResourceInAllClassLoader(String resourceName,Class<?> callingClass)

MapUtil

  • update putSumValue(Map<K, Integer> map,K key,Integer value) update return type from void to `Map<K, Integer>

ParamUtil

  • update Map<String, String[]> toSafeArrayValueMap(String queryString,String charsetType)

JsonUtil

  • make String format(Object obj,JsonConfig jsonConfig,int indentFactor,int indent) private

NumberFormatUtil

  • update String format(Number value,String numberPattern,RoundingMode roundingMode),if exception ,don't return

[Remove]

StringUtil

  • remove int searchTimes(final CharSequence source,final CharSequence target)
  • remove String firstCharToUpperCase(String word)
  • remove String firstCharToLowerCase(String word)

NumberUtil

  • remove String intToHexString(int i)
  • remove int hexStringToInt(String hexString)

PropertiesUtil

  • remove String getPropertiesValueWithClassLoader(Class<?> klass,String propertiesPath,String key)
  • remove String getPropertiesValue(Class<?> klass,String propertiesPath,String key)

ParamUtil

  • remove Map<String, String> toSingleValueMap(Map<String, String[]> arrayValueMap)
  • remove Map<String, String[]> toArrayValueMap(Map<String,String> singleValueMap)

FieldUtil

  • remove String[] getFieldsNames(Field[] fields) method

JsonUtil

  • remove String format(Object obj,JsonConfig jsonConfig)

DateFormatUtil

  • remove String format(Date date,String pattern)
  • remove String format(Date date,String pattern,Locale locale)

ClassLoaderUtil

  • remove Enumeration<URL> getResources(String resourceName,Class<?> callingClass)
  • remove Class<?> getClass(String className) ClassUtil add Class<?> getClass(String className)

[Fix Bug] πŸ›

  • [fix bug] when call JsonUtil String format(Object obj,String[] excludes,Integer indentFactor,Integer indent) set indentFactor indent Not effective

1.6.1

08 Jun 09:06
Compare
Choose a tag to compare

[Feature]

  • ArrayUtil add T[] newArray(Class<T> componentType,int length)
  • ConvertUtil add Integer toInteger(Object toBeConvertedValue,Integer defaultValue) method
  • ConvertUtil add List<T> toList(final Collection<T> collection)

[Update]

  • none

[Remove]

  • ArrayUtil remove Map<T, List<O>> group(O[] array,String propertyName) method
  • ArrayUtil remove Map<T, List<T>> group(T[] array) method

[Fix Bug] πŸ›

  • none

1.6.0

05 Jun 07:06
Compare
Choose a tag to compare

[Feature]

ConvertUtil

  • add T[] toArray(T...arrays) method

[deprecated]

Slf4jUtil

  • String formatMessage(String messagePattern,Object...args) deprecated, pls use String format(String messagePattern,Object...args) method

DateUtil

  • String date2String(Date date,String datePattern) deprecated, pls use String toString(Date date,String datePattern) method
  • Date string2Date(String dateString,String datePattern) deprecated, pls use Date toDate(String dateString,String datePattern) method

[Update]

RegexUtil

  • make Matcher getMatcher(String regexPattern,CharSequence input,int flags) private

DateUtil

  • update String toString(Date date,String datePattern) method , call commons-lang3 DateFormatUtils.format(date, datePattern)
  • move interval method to DateExtensionUtil

CollectionsUtil

  • change List<O> removeAll(Collection<O> objectCollection,String propertyName,V value) to List<O> removeAll(Collection<O> objectCollection,String propertyName,V...propertyValues)

ConvertUtil

  • change T[] convert(String[] values,Class<T> targetType) method to T[] toArray(String[] values,Class<T> targetType)

[Remove]

DateExtensionUtil

  • remove List<String> getWeekDateStringList(int week,String datePattern)
  • remove String toPrettyDateString(Date inDate) remove List<String> toStringList(List<Date> dateList,String datePattern)

CollectionsUtil

  • remove List<O> select(Collection<O> objectCollection,String propertyName,V value)
  • remove List<O> selectRejected(Collection<O> objectCollection,String propertyName,V value)

CalendarUtil

  • remove int getMaxDayOfMonth(Calendar calendar)
  • remove Calendar toCalendar(String dateString,String datePattern)
  • remove Calendar toCalendar(int year,int month,int day)

[Fix Bug] πŸ›

  • none

1.5.6

31 May 06:04
Compare
Choose a tag to compare

[Feature]

  • remove @version
  • update @author

[Update]

DateFormatUtil

  • if param locale is null,will use Locale.getDefault()

ClassUtil

  • rename boolean isInstance(Object obj,Class<?>[] klasses) to boolean isInstanceAnyClass(Object obj,Class<?>[] klasses)

ConvertUtil

  • change List<T> toList(T[] arrays) to List<T> toList(T...arrays)

JsonUtil

  • change Map<String, Object> toMap(String json) method to <T> Map<String, T> toMap(String json)
  • change String formatObjectFiledsNameAndValueMap(Object obj) method to String formatObjectFieldsNameAndValueMap(Object obj)

[Remove]

DateExtensionUtil

  • remove String getEnglishWeek(int week) method
  • remove String getChineseWeek(int week) method

CalendarUtil

  • remove int getDayOfYear(int year,int month,int day)
  • remove int getMaxDayOfMonth(int year,int month)

[Fix Bug] πŸ›

  • none

1.5.5

27 May 07:46
Compare
Choose a tag to compare

[Feature]

CollectionsUtil

  • add O find(Iterable<O> iterable,Predicate<O> predicate) method
  • add BigDecimal sum(Collection<O> objectCollection,String propertyName,Predicate<O> includePredicate) method
  • add Map<String, BigDecimal> sum(Collection<O> objectCollection,Predicate<O> includePredicate,String...propertyNames) method
  • add Map<T, List<O>> group(Collection<O> objectCollection,String propertyName,Predicate<O> includePredicate) method
  • add List<T> collect(final Iterable<O> inputIterable,final Transformer<? super O, ? extends T> transformer)
  • add List<T> collect(final Iterator<O> inputIterator,final Transformer<? super O, ? extends T> transformer)
  • add 'int indexOf(List list,String propertyName,T value)' method

MapUtil

  • add putSumValue(Map<K, Integer> map,K key,Integer value) method

[Update]

ObjectUtil

  • change isBoolean(Object object) method and isInteger(Object object) method return type, from Boolean to boolean

RandomUtil

  • String createRandomFromString(String str,int length) call RandomStringUtils.random(length, str)

CollectionsUtil

  • update avg/sum method return value from Number to BigDecimal
  • change O find(Collection<O> objectCollection,String propertyName,V value) to O find(Iterable<O> iterable,String propertyName,V value) method

ParamUtil

  • rename String joinValues(Map<String, String> singleValueMap,String...includeKeys) to String joinValuesOrderByIncludeKeys(Map<String, String> * singleValueMap,String...includeKeys)
  • rename String joinSingleValueMap(Map<String, String> singleValueMap) to String toQueryStringUseSingleValueMap(Map<String, String> singleValueMap)
  • rename String joinArrayValueMap(Map<String, String[]> arrayValueMap) to String toQueryStringUseArrayValueMap(Map<String,String[]> arrayValueMap)

NumberUtil

  • update some param to Number,and add validator

[Remove]

DateUtil

  • remove Date operateDate(Date date,int field,int amount),use org.apache.commons.lang3.time.DateUtils some method
  • update Calendar toCalendar(Date date) call DateUtils.toCalendar(date) method

NumberUtil

  • remove BigDecimal getAddValue(Number one,Number two)
  • remove BigDecimal getMultiplyValue(BigDecimal one,Serializable two,int scale)
  • remove boolean isSpecificNumber(Serializable value,String specificNumber)

[Fix Bug] πŸ›

  • none

1.5.4

16 May 08:00
Compare
Choose a tag to compare

[Feature]

  • DateExtensionUtil add List<Date> getIntervalDayList(Date fromDate,Date toDate)
  • PropertyComparator add PropertyComparator(String propertyName,Comparator comparator) Constructor
  • PropertyComparator add PropertyComparator(String propertyName, Class<? extends Comparable> propertyValueConvertToClass, Comparator comparator) Constructor

[Update]

  • update EnumerationUtil.contains method
  • make RandomUtil JVM_RANDOM private
  • update ResourceBundleUtil.readPrefixAsMap(String baseName,String prefix,String delimiters,Locale locale), return TreeMap instead of HashMap; and use StringUtil.tokenizeToStringArray(key, delimiters)
    instead of key.split(spliter)
  • Replace all <pre> with <pre class="code"> in JavaDoc

[Remove]

  • none

[Fix Bug] πŸ›

  • none

1.5.3

18 Apr 05:17
Compare
Choose a tag to compare

[Feature]

  • add Alphabet
  • PropertyUtil add setPropertyIfValueNotNullOrEmpty(Object bean,String propertyName,Object value)
  • PropertyUtil add setPropertyIfValueNotNull(Object bean,String propertyName,Object value)
  • JsonUtil add registerDefaultJsonValueProcessor(JsonConfig jsonConfig) method
  • add EnumerationUtil and move CollectionsUtil.contains(Enumeration<O> enumeration,O value)
  • add IteratorUtil ,and move CollectionsUtil.contains(Iterator<?> iterator,Object value)

[Update]

  • make com.feilong.core.RegexPattern.EMAIL com.feilong.core.RegexPattern.IP com.feilong.core.RegexPattern.URLLINK Deprecated pls use commons-validator some class instead
  • make RegexPattern some constants deprecated
  • change ObjectPropertyEqualsPredicate to BeanPropertyValueEqualsPredicate
  • update Validator , if (value instanceof CharSequence),call StringUtils.isBlank((CharSequence) value)
  • update PropertyUtil isCanFindType(Object obj,Class<T> toBeFindedClassType) to isCannotFindType(Object obj)
  • change MapUtil some method's param from K[] keys to K... keys some MapUtil method use 'LinkedHashMap' instead of 'HashMap'

[Remove]

  • none

[Fix Bug] πŸ›

  • none

1.5.2

27 Mar 12:51
Compare
Choose a tag to compare

[Feature]

  • some method use Validate.notNull
  • move Validator class from com.feilong.core.util to com.feilong.core package
  • move UncheckedIOException class from com.feilong.core.util to com.feilong.core package
  • move com.feilong.core.tools.jsonlib package to com.feilong.tools.jsonlib
  • move com.feilong.core.tools.slf4j package to com.feilong.tools.slf4j
  • move DatePattern to com.feilong.core package
  • move TimeInterval to com.feilong.core package
  • move CharsetType to com.feilong.core package
  • move NumberPattern to com.feilong.core package
  • move HtmlConstants to com.feilong.core package
  • move HttpMethodType to com.feilong.core package
  • move URIComponents to com.feilong.core package
  • move RegexPattern to com.feilong.core package

[Update]

  • update URLUtil String[] toStringArray(URL...urls) method, call ConvertUtil.toStrings(urls)
  • Validator boolean arrayIsNullOrEmpty(Object value) call Array.getLength(value)
  • update Validator class code

[Remove]

  • none

[Fix Bug] πŸ›

  • none