Skip to content

Commit a0bff14

Browse files
author
Flurb
committed
Small fixes
Signed-off-by: Flurb <[email protected]>
1 parent 947efa5 commit a0bff14

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

repository/src/main/java/org/lfenergy/compas/scl/data/exception/CompasSclDataServiceErrorCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class CompasSclDataServiceErrorCode {
1414
public static final String HEADER_NOT_FOUND_ERROR_CODE = "SDS-0004";
1515
public static final String NO_SCL_ELEMENT_FOUND_ERROR_CODE = "SDS-0005";
1616
public static final String NO_DATA_FOUND_ERROR_CODE = "SDS-0006";
17-
public static final String DULPICATE_SCL_NAME_ERROR_CODE = "SDS-0007";
17+
public static final String DUPLICATE_SCL_NAME_ERROR_CODE = "SDS-0007";
1818

1919
public static final String BASEX_CLIENT_CREATION_ERROR_CODE = "SDS-1000";
2020
public static final String BASEX_QUERY_ERROR_CODE = "SDS-1001";

repository/src/test/java/org/lfenergy/compas/scl/data/repository/AbstractCompasSclDataRepository.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
import static org.junit.jupiter.api.Assertions.*;
1818
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.*;
19-
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.HEADER_NOT_FOUND_ERROR_CODE;
20-
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.NO_DATA_FOUND_ERROR_CODE;
19+
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.*;
2120

2221
public abstract class AbstractCompasSclDataRepository {
2322
protected static final SclFileType TYPE = SclFileType.SCD;

service/src/main/java/org/lfenergy/compas/scl/data/service/impl/CompasSclDataServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import static javax.transaction.Transactional.TxType.REQUIRED;
2828
import static javax.transaction.Transactional.TxType.SUPPORTS;
2929
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.*;
30-
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.DULPICATE_SCL_NAME_ERROR_CODE;
30+
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.DUPLICATE_SCL_NAME_ERROR_CODE;
3131
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.NO_SCL_ELEMENT_FOUND_ERROR_CODE;
3232

3333
/**
@@ -122,7 +122,7 @@ public String create(SclFileType type, String name, String who, String comment,
122122
}
123123

124124
if (hasDuplicateSclName(type, name)) {
125-
throw new CompasException(DULPICATE_SCL_NAME_ERROR_CODE, "Given name of SCL File already used.");
125+
throw new CompasException(DUPLICATE_SCL_NAME_ERROR_CODE, "Given name of SCL File already used.");
126126
}
127127

128128
// A unique ID is generated to store it under.
@@ -168,7 +168,7 @@ public String update(SclFileType type, UUID id, ChangeSetType changeSetType, Str
168168
if (newFileName.isPresent()
169169
&& !newFileName.get().equals(currentSclMetaInfo.getName())
170170
&& hasDuplicateSclName(type, newFileName.get())) {
171-
throw new CompasException(DULPICATE_SCL_NAME_ERROR_CODE, "Given name of SCL File already used.");
171+
throw new CompasException(DUPLICATE_SCL_NAME_ERROR_CODE, "Given name of SCL File already used.");
172172
}
173173

174174
// We always add a new version to the database, so add version record to the SCL and create a new record.

service/src/test/java/org/lfenergy/compas/scl/data/service/impl/CompasSclDataServiceImplTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
import static java.util.Collections.emptyList;
3131
import static org.junit.jupiter.api.Assertions.*;
3232
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.*;
33-
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.NO_DATA_FOUND_ERROR_CODE;
34-
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.NO_SCL_ELEMENT_FOUND_ERROR_CODE;
33+
import static org.lfenergy.compas.scl.data.exception.CompasSclDataServiceErrorCode.*;
3534
import static org.mockito.Mockito.*;
3635

3736
@ExtendWith(MockitoExtension.class)

0 commit comments

Comments
 (0)