Skip to content

Commit c2e6cbe

Browse files
committed
Upgrade all dependencies to latest, including Vertx 4.5.24
1 parent 6b2b9cf commit c2e6cbe

File tree

6 files changed

+407
-363
lines changed

6 files changed

+407
-363
lines changed

pom.xml

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,14 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44

5+
<parent>
6+
<groupId>org.computate</groupId>
7+
<artifactId>computate-base</artifactId>
8+
<relativePath>../computate-base/pom.xml</relativePath>
9+
<version>4.5.8.0</version>
10+
</parent>
511

612
<properties>
7-
<solr.version>8.11.1</solr.version>
8-
<computate.version>4.5.8.0</computate.version>
9-
10-
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
11-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
12-
<vertx-maven-plugin.version>1.0.18</vertx-maven-plugin.version>
13-
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
14-
<exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
15-
<vertx-base.version>4.5.9</vertx-base.version>
16-
<vertx.version>${vertx-base.version}</vertx.version>
17-
<log4j.version>2.17.2</log4j.version>
18-
<log4j-slf4j-impl.version>2.17.1.redhat-00002</log4j-slf4j-impl.version>
19-
<slf4j.version>1.7.33.redhat-00001</slf4j.version>
20-
<solr.version>8.11.1</solr.version>
21-
<jackson.version>2.14.0</jackson.version>
22-
<jackson-databind.version>2.14.0</jackson-databind.version>
23-
<commons-lang3.version>3.12.0.redhat-00001</commons-lang3.version>
24-
<commons-collections.version>4.2.0.redhat-00001</commons-collections.version>
25-
<postgresql.version>42.3.3.redhat-00001</postgresql.version>
26-
<junit.version>4.13.1</junit.version>
27-
<camel.version>3.11.5.fuse-800012-redhat-00004</camel.version>
28-
<kie.version>7.59.0.Final-redhat-00010</kie.version>
29-
<drools.version>7.59.0.Final-redhat-00010</drools.version>
30-
<cloudevents.version>2.3.0</cloudevents.version>
31-
<jfreechart.version>1.5.3</jfreechart.version>
32-
<handlebars.version>4.3.0</handlebars.version>
33-
<jinjava.version>2.8.1</jinjava.version>
34-
<snakeyaml.version>2.2</snakeyaml.version>
35-
<kubernetes-client.version>20.0.1</kubernetes-client.version>
3613
</properties>
3714

3815
<modelVersion>4.0.0</modelVersion>
@@ -146,12 +123,12 @@
146123
<!-- Jackson Data -->
147124

148125
<dependency>
149-
<groupId>com.fasterxml.jackson.core</groupId>
126+
<groupId>tools.jackson.core</groupId>
150127
<artifactId>jackson-core</artifactId>
151128
<version>${jackson.version}</version>
152129
</dependency>
153130
<dependency>
154-
<groupId>com.fasterxml.jackson.dataformat</groupId>
131+
<groupId>tools.jackson.dataformat</groupId>
155132
<artifactId>jackson-dataformat-yaml</artifactId>
156133
<version>${jackson-databind.version}</version>
157134
</dependency>
@@ -199,8 +176,8 @@
199176
<!-- Tests -->
200177

201178
<dependency>
202-
<groupId>junit</groupId>
203-
<artifactId>junit</artifactId>
179+
<groupId>org.junit.jupiter</groupId>
180+
<artifactId>junit-jupiter-api</artifactId>
204181
<version>${junit.version}</version>
205182
<scope>test</scope>
206183
</dependency>

src/main/java/org/computate/frFR/java/ConfigSite.java

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ public JsonObject regexYamlObject(String champ, String texte) {
11721172
String str = regexYamlString(champ, texte);
11731173
if(str != null) {
11741174
Map<String, Object> map = yaml.load(str);
1175-
return new JsonObject(map);
1175+
return map == null ? new JsonObject() : new JsonObject(map);
11761176
}
11771177
return null;
11781178
}
@@ -1182,32 +1182,33 @@ public JsonArray regexYamlArray(String champ, String texte) {
11821182
String str = regexYamlString(champ, texte);
11831183
if(str != null) {
11841184
List<Object> list = yaml.load(str);
1185-
return new JsonArray(list);
1185+
return list == null ? new JsonArray() : new JsonArray(list);
11861186
}
11871187
return null;
11881188
}
11891189

11901190
public String regexYamlString(String champ, String texte) {
11911191
String o = null;
11921192
if (champ != null && texte != null) {
1193-
String motif = "^" + champ + ": ?([>|-]{0,2}(\\d*)\\n)?([\\s\\S]*?)(?=\\n^\\w|\\Z)";
1193+
String motif = "^(" + champ + "): ?([>|-]{0,2}(\\d*)\\n)?([\\s\\S]*?)(?=\\n^\\w|\\Z)";
11941194
Matcher m = Pattern.compile(motif, Pattern.MULTILINE).matcher(texte);
11951195
boolean trouve = m.find();
11961196
if (trouve) {
11971197
String groupe1 = m.group(1);
11981198
String groupe2 = m.group(2);
11991199
String groupe3 = m.group(3);
1200+
String groupe4 = m.group(4);
12001201
Integer spaces = 2;
1201-
if(groupe2 != null && groupe2.length() > 0)
1202-
spaces = Integer.parseInt(groupe2);
1203-
o = groupe3.replaceAll("^" + String.join("", Collections.nCopies(spaces, " ")), "").replaceAll("\n" + String.join("", Collections.nCopies(spaces, " ")), "\n");
1202+
if(groupe3 != null && groupe3.length() > 0)
1203+
spaces = Integer.parseInt(groupe3);
1204+
o = groupe4.replaceAll("^" + String.join("", Collections.nCopies(spaces, " ")), "").replaceAll("\n" + String.join("", Collections.nCopies(spaces, " ")), "\n");
12041205

1205-
if(groupe1 != null && groupe1.contains(">"))
1206+
if(groupe2 != null && groupe2.contains(">"))
12061207
o = o.replaceAll("\\n([^\\n])", " $1");
12071208

1208-
if(groupe1 != null && groupe1.contains("-"))
1209+
if(groupe2 != null && groupe2.contains("-"))
12091210
o = o.replaceAll("\\n+\\Z", "");
1210-
else if(groupe1 == null || !groupe1.contains("+"))
1211+
else if(groupe2 == null || !groupe2.contains("+"))
12111212
o = o.replaceAll("\\n\\Z", "");
12121213
} else {
12131214
motif = "^" + champ + ": (.*)";
@@ -1222,6 +1223,44 @@ else if(groupe1 == null || !groupe1.contains("+"))
12221223
return o;
12231224
}
12241225

1226+
public JsonObject regexYamlJsonObject(String champ, String texte) {
1227+
String str = null;
1228+
if (champ != null && texte != null) {
1229+
String champActuel = null;
1230+
String motif = "^(" + champ + "): ?([>|-]{0,2}(\\d*)\\n)?([\\s\\S]*?)(?=\\n^\\w|\\Z)";
1231+
Matcher m = Pattern.compile(motif, Pattern.MULTILINE).matcher(texte);
1232+
boolean trouve = m.find();
1233+
if (trouve) {
1234+
String groupe1 = m.group(1);
1235+
String groupe2 = m.group(2);
1236+
String groupe3 = m.group(3);
1237+
String groupe4 = m.group(4);
1238+
Integer spaces = 2;
1239+
champActuel = groupe1;
1240+
if(groupe3 != null && groupe3.length() > 0)
1241+
spaces = Integer.parseInt(groupe3);
1242+
str = groupe4.replaceAll("^" + String.join("", Collections.nCopies(spaces, " ")), "").replaceAll("\n" + String.join("", Collections.nCopies(spaces, " ")), "\n");
1243+
1244+
if(groupe2 != null && groupe2.contains(">"))
1245+
str = str.replaceAll("\\n([^\\n])", " $1");
1246+
1247+
if(groupe2 != null && groupe2.contains("-"))
1248+
str = str.replaceAll("\\n+\\Z", "");
1249+
else if(groupe2 == null || !groupe2.contains("+"))
1250+
str = str.replaceAll("\\n\\Z", "");
1251+
}
1252+
if(champActuel != null) {
1253+
Yaml yaml = new Yaml();
1254+
Map<String, Object> map = yaml.load(str);
1255+
JsonObject element = map == null ? new JsonObject() : new JsonObject(map);
1256+
return new JsonObject().put(champActuel, element);
1257+
} else {
1258+
return null;
1259+
}
1260+
}
1261+
return null;
1262+
}
1263+
12251264
public String regexLangueYamlString(String langueNom, String champ, String texte) {
12261265
return regexLangueYamlString(langueNom, champ, texte, null);
12271266
}

0 commit comments

Comments
 (0)