@@ -2,8 +2,8 @@ package org.cobbzilla.util.collection; | |||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.Getter; | import lombok.Getter; | ||||
import org.apache.commons.collections.CollectionUtils; | |||||
import org.apache.commons.collections.Transformer; | |||||
import org.apache.commons.collections4.CollectionUtils; | |||||
import org.apache.commons.collections4.Transformer; | |||||
import org.cobbzilla.util.reflect.ReflectionUtil; | import org.cobbzilla.util.reflect.ReflectionUtil; | ||||
import java.lang.reflect.Array; | import java.lang.reflect.Array; | ||||
@@ -2,7 +2,7 @@ package org.cobbzilla.util.collection; | |||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.Getter; | import lombok.Getter; | ||||
import org.apache.commons.collections.Transformer; | |||||
import org.apache.commons.collections4.Transformer; | |||||
@AllArgsConstructor | @AllArgsConstructor | ||||
public class StringPrefixTransformer implements Transformer { | public class StringPrefixTransformer implements Transformer { | ||||
@@ -1,6 +1,6 @@ | |||||
package org.cobbzilla.util.collection; | package org.cobbzilla.util.collection; | ||||
import org.apache.commons.collections.Transformer; | |||||
import org.apache.commons.collections4.Transformer; | |||||
public class ToStringTransformer implements Transformer { | public class ToStringTransformer implements Transformer { | ||||
@@ -7,7 +7,6 @@ import lombok.Getter; | |||||
import lombok.Setter; | import lombok.Setter; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.RandomUtils; | import org.apache.commons.lang3.RandomUtils; | ||||
import org.cobbzilla.util.collection.ToStringTransformer; | |||||
import org.cobbzilla.util.error.ExceptionHandler; | import org.cobbzilla.util.error.ExceptionHandler; | ||||
import org.cobbzilla.util.error.GeneralErrorHandler; | import org.cobbzilla.util.error.GeneralErrorHandler; | ||||
import org.cobbzilla.util.io.StreamUtil; | import org.cobbzilla.util.io.StreamUtil; | ||||
@@ -31,8 +30,6 @@ import java.util.function.Function; | |||||
import static java.lang.Long.toHexString; | import static java.lang.Long.toHexString; | ||||
import static java.util.concurrent.TimeUnit.SECONDS; | import static java.util.concurrent.TimeUnit.SECONDS; | ||||
import static java.util.stream.LongStream.range; | |||||
import static org.apache.commons.collections.CollectionUtils.collect; | |||||
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric; | import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric; | ||||
import static org.apache.commons.lang3.SystemUtils.IS_OS_MAC; | import static org.apache.commons.lang3.SystemUtils.IS_OS_MAC; | ||||
import static org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace; | import static org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace; | ||||
@@ -443,10 +440,6 @@ public class ZillaRuntime { | |||||
return new BigInteger(hex, 16).toString(36); | return new BigInteger(hex, 16).toString(36); | ||||
} | } | ||||
public static Collection<String> stringRange(Number start, Number end) { | |||||
return collect(range(start.longValue(), end.longValue()).boxed().iterator(), ToStringTransformer.instance); | |||||
} | |||||
public static String zcat() { return IS_OS_MAC ? "gzcat" : "zcat"; } | public static String zcat() { return IS_OS_MAC ? "gzcat" : "zcat"; } | ||||
public static String zcat(File f) { return (IS_OS_MAC ? "gzcat" : "zcat") + " " + abs(f); } | public static String zcat(File f) { return (IS_OS_MAC ? "gzcat" : "zcat") + " " + abs(f); } | ||||
@@ -15,7 +15,7 @@ import lombok.Cleanup; | |||||
import lombok.Getter; | import lombok.Getter; | ||||
import lombok.Setter; | import lombok.Setter; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.collections.iterators.ArrayIterator; | |||||
import org.apache.commons.collections4.iterators.ArrayIterator; | |||||
import org.apache.commons.lang3.RandomStringUtils; | import org.apache.commons.lang3.RandomStringUtils; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import org.apache.pdfbox.io.IOUtils; | import org.apache.pdfbox.io.IOUtils; | ||||
@@ -8,7 +8,7 @@ import lombok.Getter; | |||||
import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.beanutils.MethodUtils; | import org.apache.commons.beanutils.MethodUtils; | ||||
import org.apache.commons.collections.Transformer; | |||||
import org.apache.commons.collections4.Transformer; | |||||
import org.apache.commons.lang3.ArrayUtils; | import org.apache.commons.lang3.ArrayUtils; | ||||
import org.cobbzilla.util.collection.ExpirationEvictionPolicy; | import org.cobbzilla.util.collection.ExpirationEvictionPolicy; | ||||
import org.cobbzilla.util.collection.ExpirationMap; | import org.cobbzilla.util.collection.ExpirationMap; | ||||
@@ -917,8 +917,8 @@ public class ReflectionUtil { | |||||
return target; | return target; | ||||
} | } | ||||
private static Map<String, Method> setterCache = new ConcurrentHashMap<>(5000); | |||||
private static Map<Class, Object[]> nullArgCache = new ConcurrentHashMap<>(5000); | |||||
private static final Map<String, Method> setterCache = new ConcurrentHashMap<>(5000); | |||||
private static final Map<Class, Object[]> nullArgCache = new ConcurrentHashMap<>(5000); | |||||
private static void invoke_set(Object target, String token, Object value) { | private static void invoke_set(Object target, String token, Object value) { | ||||
final String cacheKey = target.getClass().getName()+"."+token+"."+(value == null ? "null" : value.getClass().getName()); | final String cacheKey = target.getClass().getName()+"."+token+"."+(value == null ? "null" : value.getClass().getName()); | ||||
@@ -1,8 +1,8 @@ | |||||
package org.cobbzilla.util.string; | package org.cobbzilla.util.string; | ||||
import com.google.common.base.CaseFormat; | import com.google.common.base.CaseFormat; | ||||
import org.apache.commons.collections.CollectionUtils; | |||||
import org.apache.commons.collections.Transformer; | |||||
import org.apache.commons.collections4.CollectionUtils; | |||||
import org.apache.commons.collections4.Transformer; | |||||
import org.apache.commons.io.input.ReaderInputStream; | import org.apache.commons.io.input.ReaderInputStream; | ||||
import org.apache.commons.lang3.ArrayUtils; | import org.apache.commons.lang3.ArrayUtils; | ||||
import org.apache.commons.lang3.LocaleUtils; | import org.apache.commons.lang3.LocaleUtils; | ||||