Skip to content

Commit d0594e0

Browse files
committed
fix code quality
1 parent a76531e commit d0594e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/de/mediathekview/mserver/crawler/phoenix/tasks/PhoenixFilmDetailTask.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import jakarta.annotation.Nullable;
1818
import java.lang.reflect.Type;
1919
import java.net.MalformedURLException;
20-
import java.net.URL;
20+
import java.net.URI;
21+
import java.net.URISyntaxException;
2122
import java.util.Optional;
2223
import java.util.Queue;
2324
import java.util.Set;
@@ -80,8 +81,8 @@ protected void processRestTarget(final CrawlerUrlDTO aDTO, final WebTarget aTarg
8081
film.setTitel(filmDetailDto.getTitle());
8182
if (filmDetailDto.getWebsite().isPresent()) {
8283
try {
83-
film.setWebsite(new URL(filmDetailDto.getWebsite().get()));
84-
} catch (MalformedURLException e) {
84+
film.setWebsite(new URI(filmDetailDto.getWebsite().get()).toURL());
85+
} catch (MalformedURLException | URISyntaxException e) {
8586
LOG.error("invalid url: ", e);
8687
}
8788
}

0 commit comments

Comments
 (0)