Skip to content

Commit fa2285b

Browse files
Dennis LabordusRob Tjalma
authored andcommitted
Sync with latest compas-core.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 2d900fe commit fa2285b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

service/src/main/java/org/lfenergy/compas/scl/data/service/CompasSclDataService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public void delete(SclType type, UUID id, Version version) {
9494
* @param name the name to add
9595
* @param fileType the file type to add.
9696
*/
97+
@SuppressWarnings("unchecked")
9798
private void setSclCompasPrivateElement(SCL scl, Optional<SCL> currentScl, Optional<String> name, SclType fileType) {
9899
var compasPrivate = compasExtensionsManager.getCompasPrivate(scl)
99100
.orElseGet(() -> {
@@ -114,13 +115,13 @@ private void setSclCompasPrivateElement(SCL scl, Optional<SCL> currentScl, Optio
114115
value -> addCompasName(compasPrivate, value),
115116
() -> currentScl
116117
.flatMap(previousScl -> compasExtensionsManager.getCompasPrivate(previousScl))
117-
.flatMap(previousCompasPrivate -> compasExtensionsManager.getCompasName(previousCompasPrivate))
118+
.flatMap(previousCompasPrivate -> compasExtensionsManager.getCompasSclName(previousCompasPrivate))
118119
.ifPresent(previousSclName -> addCompasName(compasPrivate, previousSclName))
119120
)
120121
);
121122

122123
// Always set the file type as private element.
123-
TSclFileType sclFileType = TSclFileType.valueOf(fileType.toString());
124+
var sclFileType = TSclFileType.valueOf(fileType.toString());
124125
compasExtensionsManager.getCompasElement(compasPrivate, SCL_FILETYPE_EXTENSION)
125126
.ifPresentOrElse(
126127
element -> element.setValue(sclFileType),

0 commit comments

Comments
 (0)