Skip to content

Commit 8b5eb0b

Browse files
committed
Fix "Open in Browser" action
The "url" property was changed, which silently broke this feature. Another cautionary tale for why it's better to use type-safe access methods rather than pulling string properties out of a map. ;-)
1 parent 747fb4e commit 8b5eb0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/scijava/search/web/OpenInBrowserActionFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public SearchAction create(final SearchResult result) {
6868

6969
private void openURL(final SearchResult result) {
7070
try {
71-
final URL url = new URL(result.properties().get("url"));
72-
platformService.open(url);
71+
final String url = ((WebSearchResult) result).url();
72+
platformService.open(new URL(url));
7373
}
7474
catch (final IOException exc) {
7575
log.error(exc);

0 commit comments

Comments
 (0)