Skip to content

Commit

Permalink
eliminate code warning
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Jan 17, 2024
1 parent 783c1fa commit 35a28c8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public boolean accepts(@NotNull String linkRef) {
ValueMap props = link.getLinkRequest().getResourceProperties();

// get wikipedia reference from link properties
String wikiPageName = props.get(PN_LINK_WIKIPEDIA_REF, link.getLinkRequest().getReference());
String wikiPageName = StringUtils.defaultString(props.get(PN_LINK_WIKIPEDIA_REF, String.class),
link.getLinkRequest().getReference());
String language = props.get(PN_LINK_WIKIPEDIA_LANGUAGE, DEFAULT_LANGUAGE);

// build link URL which is only an anchor tag in the preview.
Expand Down

0 comments on commit 35a28c8

Please sign in to comment.