mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复StrJoin当append内容后调用length()会出现空指针问题
This commit is contained in:
@@ -99,4 +99,13 @@ public class StrJoinerTest {
|
||||
final StrJoiner merge = joiner1.merge(joiner2);
|
||||
Assert.assertEquals("[123,456,789]", merge.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issue3444Test() {
|
||||
final StrJoiner strJoinerEmpty = StrJoiner.of(",");
|
||||
Assert.assertEquals(0, strJoinerEmpty.length());
|
||||
|
||||
final StrJoiner strJoinerWithContent = StrJoiner.of(",").append("haha");
|
||||
Assert.assertEquals(4, strJoinerWithContent.length());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user