Skip to content

Commit a3677a9

Browse files
author
Damian Staszewski
committed
moved to constructor
1 parent c4a22b1 commit a3677a9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/github/stachu540/hirezapi/api/rest/RestClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ public class RestClient {
88
private final RestTemplate rest = new RestTemplate();
99
private final Authentication authentication;
1010

11-
{ rest.setErrorHandler(new RestErrorHandler()); }
12-
13-
public RestClient(Authentication authentication) {this.authentication = authentication;}
11+
public RestClient(Authentication authentication) {
12+
this.authentication = authentication;
13+
this.rest.setErrorHandler(new RestErrorHandler());
14+
}
1415

1516
public <O extends Object> O request(String endpoint, Class<O> model, String... args) {
1617
String url = authentication.getUrl(endpoint, args);

0 commit comments

Comments
 (0)