File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/main/java/pl/koder95/eme/git Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 17
17
package pl .koder95 .eme .git ;
18
18
19
19
import org .kohsuke .github .*;
20
+ import org .kohsuke .github .connector .GitHubConnectorResponse ;
20
21
21
22
import java .io .IOException ;
22
- import java .net .HttpURLConnection ;
23
23
24
24
import static pl .koder95 .eme .Main .BUNDLE ;
25
25
33
33
public class GitHubRepositoryController {
34
34
35
35
private GitHub createNewConnection () throws IOException {
36
- return new GitHubBuilder ().withRateLimitHandler (new RateLimitHandler () {
36
+ return new GitHubBuilder ().withRateLimitHandler (new GitHubRateLimitHandler () {
37
37
@ Override
38
- public void onError (IOException e , HttpURLConnection uc ) {
39
- System .out .println (uc );
40
- e .printStackTrace ();
38
+ public void onError (GitHubConnectorResponse connectorResponse ) {
39
+ System .out .println (connectorResponse );
41
40
}
42
41
}).build ();
43
42
}
@@ -49,7 +48,7 @@ GitHub getConnection() {
49
48
try {
50
49
connection = createNewConnection ();
51
50
} catch (IOException e ) {
52
- e . printStackTrace ( );
51
+ throw new RuntimeException ( e );
53
52
}
54
53
}
55
54
return connection ;
You can’t perform that action at this time.
0 commit comments