Skip to content

Commit 76076d0

Browse files
committed
Remove unnecessary throws declarations in WebAuthnRestResource
1 parent 6369338 commit 76076d0

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

webauthn-server-demo/src/main/scala/demo/App.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,9 @@ public Set<Class<?>> getClasses() {
1919

2020
@Override
2121
public Set<Object> getSingletons() {
22-
try {
23-
return new HashSet<>(Arrays.asList(
24-
new WebAuthnRestResource()
25-
));
26-
} catch (MalformedURLException e) {
27-
throw new RuntimeException(e);
28-
}
22+
return new HashSet<>(Arrays.asList(
23+
new WebAuthnRestResource()
24+
));
2925
}
3026

3127
}

webauthn-server-demo/src/main/scala/demo/webauthn/WebAuthnRestResource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class WebAuthnRestResource {
4343
private final ObjectMapper jsonMapper = new ScalaJackson().get();
4444
private final JsonNodeFactory jsonFactory = JsonNodeFactory.instance;
4545

46-
public WebAuthnRestResource() throws MalformedURLException {
46+
public WebAuthnRestResource() {
4747
this(new WebAuthnServer());
4848
}
4949

@@ -57,7 +57,7 @@ public WebAuthnRestResource(WebAuthnServer server) {
5757
private final class IndexResponse {
5858
public final Index actions = new Index();
5959
public final Info info = new Info();
60-
private IndexResponse() throws NoSuchMethodException, MalformedURLException {
60+
private IndexResponse() throws MalformedURLException {
6161
}
6262
}
6363
private final class Index {
@@ -84,7 +84,7 @@ public Info() throws MalformedURLException {
8484
}
8585

8686
@GET
87-
public Response index() throws NoSuchMethodException, IOException {
87+
public Response index() throws IOException {
8888
return Response.ok(jsonMapper.writeValueAsString(new IndexResponse())).build();
8989
}
9090

0 commit comments

Comments
 (0)