Skip to content

Commit 2f5d779

Browse files
committed
see 08/15 log
1 parent 8a6976d commit 2f5d779

File tree

5 files changed

+19
-14
lines changed

5 files changed

+19
-14
lines changed

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
## 打个小广告
4444

45-
欢迎加入我的知识星球「**[基你太美](https://t.zsxq.com/FmeqfYF)**学习 [AucFrame](https://blankj.com/2019/07/22/auc-frame/) 框架,目前一期内测已结束,二期已开,有兴趣进群的可以加我微信(备注:基你太美二期)。
45+
欢迎加入我的知识星球「**[基你太美](https://t.zsxq.com/FmeqfYF)**,我会在星球中分享 [AucFrame](https://blankj.com/2019/07/22/auc-frame/) 框架、大厂面经、[AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode) 更详尽的说明...一切我所了解的知识,你可以通过支付进入我的星球「**[基你太美](https://t.zsxq.com/FmeqfYF)**」进行体验,加入后优先观看星球中精华的部分,如果觉得星球的内容对自身没有收益,你可以自行申请退款退出星球,也没必要加我好友;**如果你已确定要留在我的星球,可以通过扫描如下二维码(备注:基你太美)加我个人微信,向我发送你的星球 ID,方便我后续拉你进群(PS:进得越早价格越便宜)。**
4646

4747
![我的二维码](https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/wechat.png)
4848

lib/utilcode/README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ isEmpty : 判断 Map 是否为空
628628
isNotEmpty : 判断 Map 是否非空
629629
size : 获取 Map 元素个数
630630
forAllDo : 对所有元素做操作
631-
transform : 对集合做转变
631+
transform : 对 Map 做转变
632632
toString : Map 转为字符串
633633
```
634634

lib/utilcode/src/main/java/com/blankj/utilcode/util/ArrayUtils.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,39 +32,39 @@ private ArrayUtils() {
3232
*/
3333
@SafeVarargs
3434
public static <T> T[] newArray(T... array) {
35-
return copy(array);
35+
return array;
3636
}
3737

3838
public static long[] newLongArray(long... array) {
39-
return copy(array);
39+
return array;
4040
}
4141

4242
public static int[] newIntArray(int... array) {
43-
return copy(array);
43+
return array;
4444
}
4545

4646
public static short[] newShortArray(short... array) {
47-
return copy(array);
47+
return array;
4848
}
4949

5050
public static char[] newCharArray(char... array) {
51-
return copy(array);
51+
return array;
5252
}
5353

5454
public static byte[] newByteArray(byte... array) {
55-
return copy(array);
55+
return array;
5656
}
5757

5858
public static double[] newDoubleArray(double... array) {
59-
return copy(array);
59+
return array;
6060
}
6161

6262
public static float[] newFloatArray(float... array) {
63-
return copy(array);
63+
return array;
6464
}
6565

6666
public static boolean[] newBooleanArray(boolean... array) {
67-
return copy(array);
67+
return array;
6868
}
6969

7070
/**

lib/utilcode/src/main/java/com/blankj/utilcode/util/MapUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.blankj.utilcode.util;
22

3-
import android.support.annotation.NonNull;
43
import android.util.Pair;
54

65
import java.util.Collections;
@@ -64,8 +63,11 @@ public static <K, V> LinkedHashMap<K, V> newLinkedHashMap(final Pair<K, V>... pa
6463
}
6564

6665
@SafeVarargs
67-
public static <K, V> TreeMap<K, V> newTreeMap(@NonNull final Comparator<K> comparator,
66+
public static <K, V> TreeMap<K, V> newTreeMap(final Comparator<K> comparator,
6867
final Pair<K, V>... pairs) {
68+
if (comparator == null) {
69+
throw new IllegalArgumentException("comparator must not be null");
70+
}
6971
TreeMap<K, V> map = new TreeMap<>(comparator);
7072
if (pairs == null || pairs.length == 0) {
7173
return map;

lib/utilcode/src/test/java/com/blankj/utilcode/util/ArrayUtilsTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public void isSameLength() {
5353
Object emptyArr1 = new int[]{};
5454
Assert.assertTrue(ArrayUtils.isSameLength(null, emptyArr1));
5555
Assert.assertTrue(ArrayUtils.isSameLength(new boolean[0], emptyArr1));
56-
5756
}
5857

5958
@Test
@@ -188,6 +187,10 @@ public void asList() {
188187

189188
List<Integer> list = ArrayUtils.asList(1, 2, 3, 4);
190189
System.out.println(list);
190+
191+
List<Integer> list1 = ArrayUtils.asUnmodifiableList(1, 2, 3, 4);
192+
list1.set(0,2);
193+
System.out.println(list1);
191194
}
192195

193196
@Test

0 commit comments

Comments
 (0)