This commit is contained in:
Looly
2021-06-07 01:59:07 +08:00
parent 028c3ed60d
commit 70eb424cd5
11 changed files with 23 additions and 40 deletions

View File

@@ -27,7 +27,6 @@ import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
/**
* 时间工具类
@@ -931,7 +930,6 @@ public class DateUtil extends CalendarUtil {
//标准日期格式(包括单个数字的日期时间)
dateStr = normalize(dateStr);
final Matcher matcher = DatePattern.REGEX_NORM.matcher(dateStr);
if (ReUtil.isMatch(DatePattern.REGEX_NORM, dateStr)) {
final int colonCount = StrUtil.count(dateStr, CharUtil.COLON);
switch (colonCount) {

View File

@@ -778,9 +778,6 @@ public class GifDecoder {
lastRect = new Rectangle(ix, iy, iw, ih);
lastImage = image;
lastBgColor = bgColor;
int dispose = 0;
boolean transparency = false;
int delay = 0;
lct = null;
}

View File

@@ -350,10 +350,7 @@ public class NeuQuant {
/* Unbias network to give byte values 0..255 and record position i to prepare for sort
----------------------------------------------------------------------------------- */
public void unbiasnet() {
int i, j;
for (i = 0; i < NETSIZE; i++) {
for (int i = 0; i < NETSIZE; i++) {
network[i][0] >>= NETBIASSHIFT;
network[i][1] >>= NETBIASSHIFT;
network[i][2] >>= NETBIASSHIFT;

View File

@@ -387,7 +387,6 @@ public class IdcardUtil {
// 首字母A-ZA表示1以此类推
char start = idcard.charAt(0);
int iStart = start - 'A' + 1;
String mid = card.substring(1, 7);
String end = card.substring(7, 8);
char[] chars = mid.toCharArray();

View File

@@ -2038,7 +2038,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
long tmp;
while (j > i) {
swap(array, i, j);
j--;
@@ -2073,7 +2072,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
int tmp;
while (j > i) {
swap(array, i, j);
j--;
@@ -2108,7 +2106,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
short tmp;
while (j > i) {
swap(array, i, j);
j--;
@@ -2143,7 +2140,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
char tmp;
while (j > i) {
swap(array, i, j);
j--;
@@ -2178,7 +2174,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
byte tmp;
while (j > i) {
swap(array, i, j);
j--;
@@ -2213,7 +2208,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
double tmp;
while (j > i) {
swap(array, i, j);
j--;
@@ -2248,7 +2242,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
float tmp;
while (j > i) {
swap(array, i, j);
j--;
@@ -2283,7 +2276,6 @@ public class PrimitiveArrayUtil {
}
int i = Math.max(startIndexInclusive, 0);
int j = Math.min(array.length, endIndexExclusive) - 1;
boolean tmp;
while (j > i) {
swap(array, i, j);
j--;

View File

@@ -54,8 +54,7 @@ public class RadixUtil {
public static String encode(final String radixs, final int num) {
//考虑到负数问题
long tmpNum = (num >= 0 ? num : (0x100000000L - (~num + 1)));
return encode(radixs, num, 32);
return encode(radixs, tmpNum, 32);
}
/**
@@ -73,7 +72,7 @@ public class RadixUtil {
return encode(radixs, num, 64);
}
private static String encode(final String radixs, final long num, int maxLength) {
private static String encode(final String radixs, long num, int maxLength) {
if (radixs.length() < 2) {
throw new RuntimeException("自定义进制最少两个字符哦!");
}

View File

@@ -660,7 +660,6 @@ public class ZipUtil {
public static void read(ZipInputStream zipStream, Consumer<ZipEntry> consumer) {
try {
ZipEntry zipEntry;
File outItemFile;
while (null != (zipEntry = zipStream.getNextEntry())) {
consumer.accept(zipEntry);
}

View File

@@ -164,7 +164,7 @@ public class BeanUtilTest {
public void mapToBeanWinErrorTest() {
Map<String, String> map = new HashMap<>();
map.put("age", "哈哈");
Person user = BeanUtil.toBean(map, Person.class);
BeanUtil.toBean(map, Person.class);
}
@Test
@@ -559,7 +559,6 @@ public class BeanUtilTest {
@Test
public void toMapTest() {
// 测试转map的时候返回key
String name = null;
PrivilegeIClassification a = new PrivilegeIClassification();
a.setId("1");
a.setName("2");