Skip to content

Commit db16185

Browse files
author
Dennis Labordus
committed
Fixed code smell.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 8d7602c commit db16185

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scl2003/src/main/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ public Optional<TPrivate> getCompasPrivate(SCL scl) {
2727
return Optional.empty();
2828
}
2929

30-
public Optional<String> getCompasSclName(TPrivate compasPrivate) {
31-
return getCompasValue(compasPrivate, SCL_NAME, String.class);
30+
public Optional<TCompasLabels> getLabels(TPrivate compasPrivate) {
31+
return getCompasValue(compasPrivate, LABELS, TCompasLabels.class);
3232
}
3333

3434
public Optional<SclFileType> getCompasSclFileType(TPrivate compasPrivate) {
3535
return getCompasValue(compasPrivate, SCL_FILE_TYPE, SclFileType.class);
3636
}
3737

38-
public Optional<TCompasLabels> getLabels(TPrivate compasPrivate) {
39-
return getCompasValue(compasPrivate, LABELS, TCompasLabels.class);
38+
public Optional<String> getCompasSclName(TPrivate compasPrivate) {
39+
return getCompasValue(compasPrivate, SCL_NAME, String.class);
4040
}
4141

4242
private <T> Optional<T> getCompasValue(TPrivate compasPrivate, CompasExtensionsField field, Class<T> clazz) {

scl2007b/src/main/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ private <T> Optional<T> getCompasValue(TPrivate compasPrivate, CompasExtensionsF
3434
return Optional.empty();
3535
}
3636

37-
public Optional<String> getCompasSclName(TPrivate compasPrivate) {
38-
return getCompasValue(compasPrivate, SCL_NAME, String.class);
39-
}
40-
4137
public Optional<SclFileType> getCompasSclFileType(TPrivate compasPrivate) {
4238
return getCompasValue(compasPrivate, SCL_FILE_TYPE, SclFileType.class);
4339
}
4440

41+
public Optional<String> getCompasSclName(TPrivate compasPrivate) {
42+
return getCompasValue(compasPrivate, SCL_NAME, String.class);
43+
}
44+
4545
public Optional<TCompasLabels> getLabels(TPrivate compasPrivate) {
4646
return getCompasValue(compasPrivate, LABELS, TCompasLabels.class);
4747
}

0 commit comments

Comments
 (0)