Skip to content

Commit

Permalink
chore: remove try-catch requirement by using StandardCharsets
Browse files Browse the repository at this point in the history
  • Loading branch information
GiugAles committed Dec 4, 2024
1 parent 65faff2 commit aea2476
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import ch.unisg.ics.interactions.wot.td.schemas.DataSchema;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.*;
import java.nio.charset.StandardCharsets;


public class UriTemplate {

Expand All @@ -16,11 +17,7 @@ public UriTemplate(String expression) {
}

static List<String> extract(String path) {
try {
path = URLDecoder.decode(path, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
path = URLDecoder.decode(path, StandardCharsets.UTF_8);
List<String> extracted = new ArrayList<>();
int n = path.length();
String s = "";
Expand Down

0 comments on commit aea2476

Please sign in to comment.