Skip to content

Commit 0ff863f

Browse files
committed
[6262] Upgrade to Spring Boot 4
Bug: #6262 Signed-off-by: Michaël Charfadi <michael.charfadi@obeosoft.com>
1 parent 5c6db7b commit 0ff863f

File tree

65 files changed

+348
-358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+348
-358
lines changed

CHANGELOG.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ This means that the following methods `getHeaderHeightFootprint` and `getInsideL
5656
An example of this impact could be found in `EllipseNodeLayoutHandler.ts`.
5757
- https://github.com/eclipse-sirius/sirius-web/issues/1626[#1626] [diagram] Add the ability to trigger tools using key bindings.
5858
The `SingleClickOnDiagramElementTool` builder now requires a list of key bindings.
59+
- https://github.com/eclipse-sirius/sirius-web/issues/6262[#6262] [core] a lot
5960

6061

6162
=== Dependency update
6263

6364
- [releng] Switch to https://github.com/spring-projects/spring-boot/releases/tag/v3.5.11[Spring Boot 3.5.11]
6465
- [releng] Switch to @ObeoNetwork/gantt-task-react 0.6.3
66+
- [releng] Switch to Spring Boot 4.1
6567

6668
=== Bug fixes
6769

packages/core/backend/sirius-components-collaborative/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<groupId>io.projectreactor</groupId>
3434
<artifactId>reactor-core</artifactId>
3535
</dependency>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-jackson</artifactId>
39+
</dependency>
3640
<dependency>
3741
<groupId>com.fasterxml.jackson.core</groupId>
3842
<artifactId>jackson-databind</artifactId>

packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/representations/migration/IRepresentationMigrationParticipant.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -12,11 +12,9 @@
1212
*******************************************************************************/
1313
package org.eclipse.sirius.components.collaborative.representations.migration;
1414

15-
16-
import com.fasterxml.jackson.databind.JsonNode;
17-
import com.fasterxml.jackson.databind.node.ObjectNode;
18-
1915
import org.eclipse.sirius.components.core.api.IEditingContext;
16+
import tools.jackson.databind.JsonNode;
17+
import tools.jackson.databind.node.ObjectNode;
2018

2119
/**
2220
* Interface of IRepresentationMigrationParticipant.

packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/representations/migration/RepresentationMigrationService.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -12,15 +12,14 @@
1212
*******************************************************************************/
1313
package org.eclipse.sirius.components.collaborative.representations.migration;
1414

15-
import com.fasterxml.jackson.databind.JsonNode;
16-
import com.fasterxml.jackson.databind.ObjectMapper;
17-
import com.fasterxml.jackson.databind.node.ObjectNode;
18-
1915
import java.util.ArrayList;
2016
import java.util.List;
2117
import java.util.Objects;
2218

2319
import org.eclipse.sirius.components.core.api.IEditingContext;
20+
import tools.jackson.databind.JsonNode;
21+
import tools.jackson.databind.ObjectMapper;
22+
import tools.jackson.databind.node.ObjectNode;
2423

2524
/**
2625
* Used to manipulate the Json content before deserialization.
@@ -44,16 +43,17 @@ public void parseProperties(ObjectNode root, ObjectMapper mapper) {
4443
}
4544

4645
List<String> attributes = new ArrayList<>();
47-
root.fieldNames().forEachRemaining(attributes::add);
46+
root.properties().forEach(entry -> attributes.add(entry.getKey()));
47+
4848
for (String attribute : attributes) {
4949
var currentNode = root.get(attribute);
5050

51-
if (currentNode.isObject() && currentNode.isContainerNode()) {
51+
if (currentNode.isObject() && currentNode.isContainer()) {
5252
this.parseProperties((ObjectNode) currentNode, mapper);
5353
}
54-
if (currentNode.isArray() && currentNode.isContainerNode()) {
54+
if (currentNode.isArray() && currentNode.isContainer()) {
5555
for (JsonNode objNode : currentNode) {
56-
if (objNode.isContainerNode()) {
56+
if (objNode.isContainer()) {
5757
this.parseProperties((ObjectNode) objNode, mapper);
5858
}
5959
}

packages/diagrams/backend/sirius-components-diagrams-tests/src/main/java/org/eclipse/sirius/components/diagrams/tests/builder/JsonBasedEditingContext.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2022 Obeo.
2+
* Copyright (c) 2022, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -12,8 +12,8 @@
1212
*******************************************************************************/
1313
package org.eclipse.sirius.components.diagrams.tests.builder;
1414

15-
import com.fasterxml.jackson.core.JsonProcessingException;
16-
import com.fasterxml.jackson.databind.ObjectMapper;
15+
import tools.jackson.core.JacksonException;
16+
import tools.jackson.databind.ObjectMapper;
1717

1818
import java.io.IOException;
1919
import java.nio.file.Files;
@@ -41,7 +41,7 @@ public JsonBasedEditingContext(String json) {
4141
this.id = UUID.randomUUID();
4242
try {
4343
this.root = new ObjectMapper().readValue(json, Element.class);
44-
} catch (JsonProcessingException exception) {
44+
} catch (JacksonException exception) {
4545
this.logger.warn(exception.getMessage(), exception);
4646
}
4747
}

packages/releng/backend/sirius-web-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>org.springframework.boot</groupId>
2121
<artifactId>spring-boot-starter-parent</artifactId>
22-
<version>3.5.11</version>
22+
<version>4.0.0</version>
2323
<relativePath /> <!-- lookup parent from repository -->
2424
</parent>
2525

packages/sirius-web/backend/sirius-web-application/pom.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<groupId>org.springframework.boot</groupId>
3434
<artifactId>spring-boot-starter-web</artifactId>
3535
</dependency>
36+
<dependency>
37+
<groupId>tools.jackson.dataformat</groupId>
38+
<artifactId>jackson-dataformat-csv</artifactId>
39+
</dependency>
3640
<dependency>
3741
<groupId>org.eclipse.sirius</groupId>
3842
<artifactId>sirius-web-domain</artifactId>
@@ -253,11 +257,6 @@
253257
<artifactId>swagger-annotations-jakarta</artifactId>
254258
<version>2.2.27</version>
255259
</dependency>
256-
<dependency>
257-
<groupId>com.fasterxml.jackson.dataformat</groupId>
258-
<artifactId>jackson-dataformat-csv</artifactId>
259-
</dependency>
260-
261260
<dependency>
262261
<groupId>org.eclipse.sirius</groupId>
263262
<artifactId>sirius-components-tests</artifactId>

packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/editingcontext/migration/participants/representation/DiagramAlignmentAttributeMigrationParticipant.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -13,8 +13,8 @@
1313

1414
package org.eclipse.sirius.web.application.editingcontext.migration.participants.representation;
1515

16-
import com.fasterxml.jackson.databind.JsonNode;
17-
import com.fasterxml.jackson.databind.node.ObjectNode;
16+
import tools.jackson.databind.JsonNode;
17+
import tools.jackson.databind.node.ObjectNode;
1818

1919
import org.eclipse.sirius.components.collaborative.representations.migration.IRepresentationMigrationParticipant;
2020
import org.eclipse.sirius.components.core.api.IEditingContext;

packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/editingcontext/migration/participants/representation/DiagramAnchorsAttributeMigrationParticipant.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -13,12 +13,11 @@
1313

1414
package org.eclipse.sirius.web.application.editingcontext.migration.participants.representation;
1515

16-
import com.fasterxml.jackson.databind.JsonNode;
17-
import com.fasterxml.jackson.databind.node.ObjectNode;
18-
1916
import org.eclipse.sirius.components.collaborative.representations.migration.IRepresentationMigrationParticipant;
2017
import org.eclipse.sirius.components.core.api.IEditingContext;
2118
import org.springframework.stereotype.Service;
19+
import tools.jackson.databind.JsonNode;
20+
import tools.jackson.databind.node.ObjectNode;
2221

2322
/**
2423
* Remove the attributes source and target anchor relative positions from diagram representation and in its content.

packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/editingcontext/migration/participants/representation/DiagramCustomizedPropertiesAttributeMigrationParticipant.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -13,8 +13,8 @@
1313

1414
package org.eclipse.sirius.web.application.editingcontext.migration.participants.representation;
1515

16-
import com.fasterxml.jackson.databind.JsonNode;
17-
import com.fasterxml.jackson.databind.node.ObjectNode;
16+
import tools.jackson.databind.JsonNode;
17+
import tools.jackson.databind.node.ObjectNode;
1818

1919
import org.eclipse.sirius.components.collaborative.representations.migration.IRepresentationMigrationParticipant;
2020
import org.eclipse.sirius.components.core.api.IEditingContext;

0 commit comments

Comments
 (0)