Skip to content

Commit 1c4f4a9

Browse files
author
lijun695
committed
升级依赖
1 parent 95319c6 commit 1c4f4a9

File tree

2 files changed

+37
-19
lines changed

2 files changed

+37
-19
lines changed

pom.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@
1414

1515
<properties>
1616
<jol.version>0.17</jol.version>
17-
<jmh.version>1.36</jmh.version>
17+
<jmh.version>1.37</jmh.version>
1818
<gson.version>2.10.1</gson.version>
19-
<joda.version>2.10.13</joda.version>
20-
<byte-buddy.version>1.14.4</byte-buddy.version>
21-
<netty.version>4.1.92.Final</netty.version>
22-
<protobuf.version>3.23.1</protobuf.version>
23-
<guava.version>31.1-jre</guava.version>
19+
<joda.version>2.12.5</joda.version>
20+
<byte-buddy.version>1.14.11</byte-buddy.version>
21+
<netty.version>4.1.104.Final</netty.version>
22+
<protobuf.version>3.25.1</protobuf.version>
23+
<guava.version>33.0.0-jre</guava.version>
2424
<commons-collections4.version>4.4</commons-collections4.version>
25-
<eclipse-collections.version>11.0.0</eclipse-collections.version>
25+
<eclipse-collections.version>11.1.0</eclipse-collections.version>
2626
<slf4j.version>1.7.36</slf4j.version>
2727
<logback.version>1.2.12</logback.version>
2828

29-
<junit.version>5.8.2</junit.version>
30-
<assertj.version>3.23.1</assertj.version>
29+
<junit.version>5.10.1</junit.version>
30+
<assertj.version>3.25.1</assertj.version>
3131

32-
<asciidoctorj.version>2.5.8</asciidoctorj.version>
33-
<asciidoctorj-pdf.version>2.3.7</asciidoctorj-pdf.version>
32+
<asciidoctorj.version>2.5.11</asciidoctorj.version>
33+
<asciidoctorj-pdf.version>2.3.10</asciidoctorj-pdf.version>
3434
<asciidoctorj-epub3.version>1.5.1</asciidoctorj-epub3.version>
35-
<asciidoctorj-diagram.version>2.2.8</asciidoctorj-diagram.version>
36-
<asciidoctor-multipage.version>0.0.16</asciidoctor-multipage.version>
35+
<asciidoctorj-diagram.version>2.2.14</asciidoctorj-diagram.version>
36+
<asciidoctor-multipage.version>0.0.19</asciidoctor-multipage.version>
3737
<asciidoctor-comment-links.version>0.0.1</asciidoctor-comment-links.version>
38-
<asciidoctor-maven-plugin.version>2.2.3</asciidoctor-maven-plugin.version>
39-
<jruby.version>9.3.10.0</jruby.version>
38+
<asciidoctor-maven-plugin.version>2.2.4</asciidoctor-maven-plugin.version>
39+
<jruby.version>9.4.5.0</jruby.version>
4040
<gem.path>${project.basedir}/cfg/gems</gem.path>
4141
<pdf-fonts.path>${project.basedir}/cfg/fonts</pdf-fonts.path>
4242
<pdf-fonts.baseuri>https://github.com/diguage/open-fonts/releases/download/latest</pdf-fonts.baseuri>
4343

4444
<mavengem-wagon.version>1.0.3</mavengem-wagon.version>
4545
<gem-maven-plugin.version>2.0.1</gem-maven-plugin.version>
46-
<download-maven-plugin.version>1.7.0</download-maven-plugin.version>
46+
<download-maven-plugin.version>1.8.0</download-maven-plugin.version>
4747
<maven.compiler.source>17</maven.compiler.source>
4848
<maven.compiler.target>17</maven.compiler.target>
4949
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/com/diguage/truman/StringTest.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,33 @@
22

33
import org.junit.jupiter.api.Test;
44

5-
import java.util.Arrays;
6-
import java.util.HashSet;
7-
import java.util.Set;
5+
import java.util.*;
6+
import java.util.concurrent.TimeUnit;
7+
import java.util.concurrent.locks.LockSupport;
88
import java.util.regex.Matcher;
99
import java.util.regex.Pattern;
1010

1111
import static org.assertj.core.api.Assertions.assertThatThrownBy;
1212

1313
public class StringTest {
1414

15+
16+
@Test
17+
public void testDedup() {
18+
List<String> lists = new ArrayList<>(1);
19+
for (int i = 0; i < Integer.MAX_VALUE; i++) {
20+
String is = String.valueOf(i);
21+
String s1 = "D瓜哥 · https://www.digauge.com".repeat(i % 10) + is;
22+
lists.add(new String(s1.substring(0, s1.length() - is.length())));
23+
String s2 = i + "D瓜哥 · https://www.digauge.com";
24+
lists.add(new String(s2.substring(is.length())));
25+
System.out.println(lists.size());
26+
if (i % 1000 == 0) {
27+
LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(2L));
28+
}
29+
}
30+
}
31+
1532
@Test
1633
public void testSplit() {
1734
String s = "abc";
@@ -36,6 +53,7 @@ public void testReplaceAll() {
3653
* 占位符正则表达式:${\w*}
3754
*/
3855
private static final Pattern PH_PATTERN = Pattern.compile("(\\u0024\\{\\w*\\})+");
56+
3957
private static Set<String> getAllPlaceholders(String value) {
4058
Matcher matcher = PH_PATTERN.matcher(value);
4159
Set<String> placeholders = new HashSet<>();

0 commit comments

Comments
 (0)