Skip to content

Commit

Permalink
Merge pull request #207 from Interactions-HSG/feat/use-standard-charset
Browse files Browse the repository at this point in the history
chore: remove try-catch requirement by using StandardCharsets
  • Loading branch information
GiugAles authored Dec 4, 2024
2 parents 65faff2 + d58363f commit e40ef04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
codecov:
token: ecfaa8ba-6599-4bf2-b184-eff4db78ea21
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 e40ef04

Please sign in to comment.