Skip to content

Commit 1f6d1da

Browse files
committed
do not hide checked IOException in unchecked IllegalArgumentException
1 parent 832ebd3 commit 1f6d1da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+113
-93
lines changed

changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[SNAPSHOT]
2+
* do not hide checked IOException in unchecked IllegalArgumentException
3+
14
[2.7.0]
25
* make http async client implementation be more pluggable
36
* add async-http-client 2.0 support (thanks to Sai Chandrasekharan https://github.com/saichand)

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/AWeberExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.github.scribejava.core.model.Response;
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
12+
import java.io.IOException;
1213

1314
public abstract class AWeberExample {
1415

@@ -18,7 +19,7 @@ public abstract class AWeberExample {
1819
private static final String CONSUMER_KEY = "";
1920
private static final String CONSUMER_SECRET = "";
2021

21-
public static void main(String... args) {
22+
public static void main(String... args) throws IOException {
2223
final OAuth10aService service = new ServiceBuilder()
2324
.apiKey(CONSUMER_KEY)
2425
.apiSecret(CONSUMER_SECRET)

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/DiggExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
import com.github.scribejava.core.model.Response;
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
12+
import java.io.IOException;
1213

1314
public abstract class DiggExample {
1415

1516
private static final String NETWORK_NAME = "Digg";
1617
private static final String PROTECTED_RESOURCE_URL = "http://services.digg.com/2.0/comment.digg";
1718

18-
public static void main(String... args) {
19+
public static void main(String... args) throws IOException {
1920
// Replace these with your own api key and secret
2021
final String apiKey = "myKey";
2122
final String apiSecret = "mySecret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FacebookExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
import com.github.scribejava.core.model.Response;
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth20Service;
12+
import java.io.IOException;
1213

1314
public abstract class FacebookExample {
1415

1516
private static final String NETWORK_NAME = "Facebook";
1617
private static final String PROTECTED_RESOURCE_URL = "https://graph.facebook.com/v2.6/me";
1718

18-
public static void main(String... args) {
19+
public static void main(String... args) throws IOException {
1920
// Replace these with your client id and secret
2021
final String clientId = "your client id";
2122
final String clientSecret = "your client secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FlickrExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
import com.github.scribejava.core.model.Response;
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
12+
import java.io.IOException;
1213

1314
public abstract class FlickrExample {
1415

1516
private static final String PROTECTED_RESOURCE_URL = "http://api.flickr.com/services/rest/";
1617

17-
public static void main(String... args) {
18+
public static void main(String... args) throws IOException {
1819
// Replace these with your own api key and secret
1920
final String apiKey = "your_app_id";
2021
final String apiSecret = "your_api_secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/Foursquare2Example.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
import com.github.scribejava.core.model.Response;
99
import com.github.scribejava.core.model.Verb;
1010
import com.github.scribejava.core.oauth.OAuth20Service;
11+
import java.io.IOException;
1112

1213
public abstract class Foursquare2Example {
1314

1415
private static final String PROTECTED_RESOURCE_URL
1516
= "https://api.foursquare.com/v2/users/self/friends?oauth_token=";
1617

17-
public static void main(String... args) {
18+
public static void main(String... args) throws IOException {
1819
// Replace these with your own api key and secret
1920
final String apiKey = "your client id";
2021
final String apiSecret = "your client secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FoursquareExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
import com.github.scribejava.core.model.Response;
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
12+
import java.io.IOException;
1213

1314
public abstract class FoursquareExample {
1415

1516
private static final String PROTECTED_RESOURCE_URL = "http://api.foursquare.com/v1/user";
1617

17-
public static void main(String... args) {
18+
public static void main(String... args) throws IOException {
1819
final OAuth10aService service = new ServiceBuilder()
1920
.apiKey("your client id")
2021
.apiSecret("your client secret")

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FreelancerExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.SignatureType;
1111
import com.github.scribejava.core.model.Verb;
1212
import com.github.scribejava.core.oauth.OAuth10aService;
13+
import java.io.IOException;
1314

1415
public abstract class FreelancerExample {
1516

@@ -19,7 +20,7 @@ public abstract class FreelancerExample {
1920
private static final String PROTECTED_RESOURCE_URL = "http://api.sandbox.freelancer.com/Job/getJobList.json";
2021
private static final String SCOPE = "http://api.sandbox.freelancer.com";
2122

22-
public static void main(String... args) {
23+
public static void main(String... args) throws IOException {
2324
final OAuth10aService service = new ServiceBuilder()
2425
.signatureType(SignatureType.QueryString)
2526
.apiKey("your client id")

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/GeniusExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
import com.github.scribejava.core.model.Response;
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth20Service;
12+
import java.io.IOException;
1213

1314
public abstract class GeniusExample {
1415

1516
private static final String NETWORK_NAME = "Genius";
1617
private static final String PROTECTED_RESOURCE_URL = "https://api.genius.com/songs/378195";
1718

18-
public static void main(String... args) {
19+
public static void main(String... args) throws IOException {
1920
// Replace these with your client id and secret
2021
final String clientId = "your client id";
2122
final String clientSecret = "your client secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/GitHubExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
import com.github.scribejava.core.model.Response;
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth20Service;
12+
import java.io.IOException;
1213

1314
public abstract class GitHubExample {
1415

1516
private static final String NETWORK_NAME = "GitHub";
1617
private static final String PROTECTED_RESOURCE_URL = "https://api.github.com/user";
1718

18-
public static void main(String... args) {
19+
public static void main(String... args) throws IOException {
1920
// Replace these with your client id and secret
2021
final String clientId = "your client id";
2122
final String clientSecret = "your client secret";

0 commit comments

Comments
 (0)