Skip to content

Commit

Permalink
Fixed code smell.
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Labordus <[email protected]>
  • Loading branch information
Dennis Labordus committed Sep 14, 2022
1 parent 8d7602c commit db16185
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ public Optional<TPrivate> getCompasPrivate(SCL scl) {
return Optional.empty();
}

public Optional<String> getCompasSclName(TPrivate compasPrivate) {
return getCompasValue(compasPrivate, SCL_NAME, String.class);
public Optional<TCompasLabels> getLabels(TPrivate compasPrivate) {
return getCompasValue(compasPrivate, LABELS, TCompasLabels.class);
}

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

public Optional<TCompasLabels> getLabels(TPrivate compasPrivate) {
return getCompasValue(compasPrivate, LABELS, TCompasLabels.class);
public Optional<String> getCompasSclName(TPrivate compasPrivate) {
return getCompasValue(compasPrivate, SCL_NAME, String.class);
}

private <T> Optional<T> getCompasValue(TPrivate compasPrivate, CompasExtensionsField field, Class<T> clazz) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ private <T> Optional<T> getCompasValue(TPrivate compasPrivate, CompasExtensionsF
return Optional.empty();
}

public Optional<String> getCompasSclName(TPrivate compasPrivate) {
return getCompasValue(compasPrivate, SCL_NAME, String.class);
}

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

public Optional<String> getCompasSclName(TPrivate compasPrivate) {
return getCompasValue(compasPrivate, SCL_NAME, String.class);
}

public Optional<TCompasLabels> getLabels(TPrivate compasPrivate) {
return getCompasValue(compasPrivate, LABELS, TCompasLabels.class);
}
Expand Down

0 comments on commit db16185

Please sign in to comment.