Skip to content

Commit

Permalink
[Ref] Minor simplification of LangString.getLanguage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Nov 3, 2023
1 parent 5451f80 commit 1170ba2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public LangString(String value, String language) {
@Override
public Optional<String> getLanguage() {
final Optional<String> superResult = super.getLanguage();
return JsonLd.NONE.equals(superResult.get()) ? Optional.empty() : superResult;
return superResult.filter(s -> !JsonLd.NONE.equals(s));
}

@Override
Expand Down

0 comments on commit 1170ba2

Please sign in to comment.