Skip to content

Commit

Permalink
use URL
Browse files Browse the repository at this point in the history
  • Loading branch information
kitdim committed Feb 4, 2024
1 parent c63d1bc commit 122b197
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/hexlet/code/controller/UrlController.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.javalin.http.NotFoundResponse;
import lombok.extern.slf4j.Slf4j;

import java.net.URI;
import java.net.URL;
import java.util.Collections;
import java.sql.SQLException;
Expand Down Expand Up @@ -48,7 +47,7 @@ public static void create(Context ctx) throws SQLException {
.toLowerCase();
String normalizedUrl;
try {
URL someUrl = new URI(input).toURL();
URL someUrl = new URL(input);
normalizedUrl = Normalizer.getNormalizedURL(someUrl);
} catch (Exception exception) {
log.info(exception.getMessage());
Expand Down

0 comments on commit 122b197

Please sign in to comment.