Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita7b01f6

Browse files
committed
update deps
1 parentcca662c commita7b01f6

File tree

8 files changed

+51
-88
lines changed

8 files changed

+51
-88
lines changed

‎pmd.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<ruleref="category/java/errorprone.xml/IdempotentOperations" />
9494
<ruleref="category/java/errorprone.xml/ImportFromSamePackage" />
9595
<ruleref="category/java/errorprone.xml/InstantiationToGetClass" />
96-
<ruleref="category/java/errorprone.xml/InvalidSlf4jMessageFormat" />
96+
<ruleref="category/java/errorprone.xml/InvalidLogMessageFormat" />
9797
<ruleref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass" />
9898
<ruleref="category/java/errorprone.xml/StringBufferInstantiationWithChar" />
9999
<ruleref="category/java/errorprone.xml/UnconditionalIfStatement" />

‎pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@
5656
<dependency>
5757
<groupId>com.fasterxml.jackson.core</groupId>
5858
<artifactId>jackson-databind</artifactId>
59-
<version>2.10.0</version>
59+
<version>2.10.3</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>junit</groupId>
6363
<artifactId>junit</artifactId>
64-
<version>4.12</version>
64+
<version>4.13</version>
6565
<scope>test</scope>
6666
</dependency>
6767
<dependency>
6868
<groupId>com.squareup.okhttp3</groupId>
6969
<artifactId>mockwebserver</artifactId>
70-
<version>4.2.2</version>
70+
<version>4.4.1</version>
7171
<scope>test</scope>
7272
</dependency>
7373
</dependencies>
@@ -91,7 +91,7 @@
9191
<plugin>
9292
<groupId>org.apache.maven.plugins</groupId>
9393
<artifactId>maven-jar-plugin</artifactId>
94-
<version>3.1.2</version>
94+
<version>3.2.0</version>
9595
<configuration>
9696
<archive>
9797
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
@@ -101,12 +101,12 @@
101101
<plugin>
102102
<groupId>org.apache.maven.plugins</groupId>
103103
<artifactId>maven-checkstyle-plugin</artifactId>
104-
<version>3.1.0</version>
104+
<version>3.1.1</version>
105105
<dependencies>
106106
<dependency>
107107
<groupId>com.puppycrawl.tools</groupId>
108108
<artifactId>checkstyle</artifactId>
109-
<version>8.25</version>
109+
<version>8.30</version>
110110
</dependency>
111111
</dependencies>
112112
</plugin>
@@ -174,7 +174,7 @@
174174
<plugin>
175175
<groupId>org.apache.maven.plugins</groupId>
176176
<artifactId>maven-source-plugin</artifactId>
177-
<version>3.1.0</version>
177+
<version>3.2.1</version>
178178
<executions>
179179
<execution>
180180
<id>attach-sources</id>
@@ -227,7 +227,7 @@
227227
<plugin>
228228
<groupId>org.apache.maven.plugins</groupId>
229229
<artifactId>maven-pmd-plugin</artifactId>
230-
<version>3.12.0</version>
230+
<version>3.13.0</version>
231231
<dependencies>
232232
<dependency>
233233
<groupId>net.sourceforge.pmd</groupId>
@@ -273,7 +273,7 @@
273273

274274
<properties>
275275
<java.release>7</java.release>
276-
<pmdVersion>6.17.0</pmdVersion>
276+
<pmdVersion>6.22.0</pmdVersion>
277277
</properties>
278278

279279
<profiles>

‎scribejava-apis/src/test/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractorTest.java

Lines changed: 19 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,34 @@
44
importcom.github.scribejava.core.oauth2.OAuth2Error;
55
importjava.io.IOException;
66

7-
importorg.hamcrest.FeatureMatcher;
8-
importorg.junit.Rule;
97
importorg.junit.Test;
10-
importorg.junit.rules.ExpectedException;
118

12-
importstaticorg.hamcrest.CoreMatchers.equalTo;
9+
importstaticorg.junit.Assert.assertThrows;
10+
importstaticorg.junit.Assert.assertSame;
11+
importstaticorg.junit.Assert.assertEquals;
12+
importorg.junit.function.ThrowingRunnable;
1313

1414
publicclassFitBitJsonTokenExtractorTest {
1515

16-
privatestaticfinalStringERROR_DESCRIPTION ="Authorization code invalid: " +
17-
"cbb1c11b23209011e89be71201fa6381464dc0af " +
18-
"Visit https://dev.fitbit.com/docs/oauth2 for more information " +
19-
"on the Fitbit Web API authorization process.";
20-
privatestaticfinalStringERROR_JSON ="{\"errors\":[{\"errorType\":\"invalid_grant\",\"message\":\"" +
21-
ERROR_DESCRIPTION +"\"}],\"success\":false}";
22-
23-
@Rule
24-
publicExpectedExceptionthrown =ExpectedException.none();
16+
privatestaticfinalStringERROR_DESCRIPTION ="Authorization code invalid: "
17+
+"cbb1c11b23209011e89be71201fa6381464dc0af "
18+
+"Visit https://dev.fitbit.com/docs/oauth2 for more information "
19+
+"on the Fitbit Web API authorization process.";
20+
privatestaticfinalStringERROR_JSON ="{\"errors\":[{\"errorType\":\"invalid_grant\",\"message\":\""
21+
+ERROR_DESCRIPTION +"\"}],\"success\":false}";
2522

2623
@Test
2724
publicvoidtestErrorExtraction()throwsIOException {
2825

2926
finalFitBitJsonTokenExtractorextractor =newFitBitJsonTokenExtractor();
30-
31-
thrown.expect(OAuth2AccessTokenErrorResponse.class);
32-
thrown.expect(newErrorCodeFeatureMatcher(OAuth2Error.INVALID_GRANT));
33-
thrown.expect(newErrorDescriptionFeatureMatcher(ERROR_DESCRIPTION));
34-
35-
extractor.generateError(ERROR_JSON);
36-
}
37-
38-
privatestaticclassErrorCodeFeatureMatcherextendsFeatureMatcher<OAuth2AccessTokenErrorResponse,OAuth2Error> {
39-
40-
privateErrorCodeFeatureMatcher(OAuth2Errorexpected) {
41-
super(equalTo(expected),"a response with errorCode","errorCode");
42-
}
43-
44-
@Override
45-
protectedOAuth2ErrorfeatureValueOf(OAuth2AccessTokenErrorResponseactual) {
46-
returnactual.getError();
47-
}
48-
}
49-
50-
privatestaticclassErrorDescriptionFeatureMatcherextendsFeatureMatcher<OAuth2AccessTokenErrorResponse,String> {
51-
52-
privateErrorDescriptionFeatureMatcher(Stringexpected) {
53-
super(equalTo(expected),"a response with errorDescription","errorDescription");
54-
}
55-
56-
@Override
57-
protectedStringfeatureValueOf(OAuth2AccessTokenErrorResponseactual) {
58-
returnactual.getErrorDescription();
59-
}
27+
finalOAuth2AccessTokenErrorResponsethrown =assertThrows(OAuth2AccessTokenErrorResponse.class,
28+
newThrowingRunnable() {
29+
@Override
30+
publicvoidrun()throwsThrowable {
31+
extractor.generateError(ERROR_JSON);
32+
}
33+
});
34+
assertSame(OAuth2Error.INVALID_GRANT,thrown.getError());
35+
assertEquals(ERROR_DESCRIPTION,thrown.getErrorDescription());
6036
}
6137
}

‎scribejava-core/src/main/java/com/github/scribejava/core/httpclient/multipart/MultipartPayload.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private static Map<String, String> composeHeaders(String subtype, String boundar
7777

7878
staticvoidcheckBoundarySyntax(Stringboundary) {
7979
if (boundary ==null || !BOUNDARY_REGEXP.matcher(boundary).matches()) {
80-
thrownewIllegalArgumentException("{'boundary'='" +boundary +"'} hasinvaid syntax. Should be '"
80+
thrownewIllegalArgumentException("{'boundary'='" +boundary +"'} hasinvalid syntax. Should be '"
8181
+BOUNDARY_PATTERN +"'.");
8282
}
8383
}

‎scribejava-core/src/test/java/com/github/scribejava/core/httpclient/multipart/MultipartPayloadTest.java

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
packagecom.github.scribejava.core.httpclient.multipart;
22

3-
importorg.hamcrest.core.StringStartsWith;
43
importstaticorg.junit.Assert.assertEquals;
54
importstaticorg.junit.Assert.assertNull;
6-
importorg.junit.Rule;
5+
importstaticorg.junit.Assert.assertThrows;
6+
importstaticorg.junit.Assert.assertTrue;
77
importorg.junit.Test;
8-
importorg.junit.rules.ExpectedException;
8+
importorg.junit.function.ThrowingRunnable;
99

1010
publicclassMultipartPayloadTest {
1111

12-
@Rule
13-
publicExpectedExceptionthrown =ExpectedException.none();
14-
1512
@Test
1613
publicvoidtestValidCheckBoundarySyntax() {
1714
MultipartPayload.checkBoundarySyntax("0aA'()+_,-./:=?");
@@ -22,47 +19,27 @@ public void testValidCheckBoundarySyntax() {
2219

2320
@Test
2421
publicvoidtestNonValidLastWhiteSpaceCheckBoundarySyntax() {
25-
finalStringboundary ="0aA'()+_,-./:=? ";
26-
thrown.expect(IllegalArgumentException.class);
27-
thrown.expectMessage(
28-
StringStartsWith.startsWith("{'boundary'='" +boundary +"'} has invaid syntax. Should be '"));
29-
MultipartPayload.checkBoundarySyntax(boundary);
22+
testBoundary("0aA'()+_,-./:=? ");
3023
}
3124

3225
@Test
3326
publicvoidtestNonValidEmptyCheckBoundarySyntax() {
34-
finalStringboundary ="";
35-
thrown.expect(IllegalArgumentException.class);
36-
thrown.expectMessage(
37-
StringStartsWith.startsWith("{'boundary'='" +boundary +"'} has invaid syntax. Should be '"));
38-
MultipartPayload.checkBoundarySyntax(boundary);
27+
testBoundary("");
3928
}
4029

4130
@Test
4231
publicvoidtestNonValidIllegalSymbolCheckBoundarySyntax() {
43-
finalStringboundary ="0aA'()+_;,-./:=? ";
44-
thrown.expect(IllegalArgumentException.class);
45-
thrown.expectMessage(
46-
StringStartsWith.startsWith("{'boundary'='" +boundary +"'} has invaid syntax. Should be '"));
47-
MultipartPayload.checkBoundarySyntax(boundary);
32+
testBoundary("0aA'()+_;,-./:=? ");
4833
}
4934

5035
@Test
5136
publicvoidtestNonValidTooLongCheckBoundarySyntax() {
52-
finalStringboundary ="12345678901234567890123456789012345678901234567890123456789012345678901";
53-
thrown.expect(IllegalArgumentException.class);
54-
thrown.expectMessage(
55-
StringStartsWith.startsWith("{'boundary'='" +boundary +"'} has invaid syntax. Should be '"));
56-
MultipartPayload.checkBoundarySyntax(boundary);
37+
testBoundary("12345678901234567890123456789012345678901234567890123456789012345678901");
5738
}
5839

5940
@Test
6041
publicvoidtestNonValidNullCheckBoundarySyntax() {
61-
finalStringboundary =null;
62-
thrown.expect(IllegalArgumentException.class);
63-
thrown.expectMessage(
64-
StringStartsWith.startsWith("{'boundary'='" +boundary +"'} has invaid syntax. Should be '"));
65-
MultipartPayload.checkBoundarySyntax(boundary);
42+
testBoundary(null);
6643
}
6744

6845
@Test
@@ -118,4 +95,14 @@ public void testParseBoundaryFromHeader() {
11895
assertNull(MultipartPayload.parseBoundaryFromHeader("multipart/subtype; boundary=;123"));
11996
assertNull(MultipartPayload.parseBoundaryFromHeader("multipart/subtype; boundary=\"\"123"));
12097
}
98+
99+
privatestaticvoidtestBoundary(finalStringboundary) {
100+
finalIllegalArgumentExceptionthrown =assertThrows(IllegalArgumentException.class,newThrowingRunnable() {
101+
@Override
102+
publicvoidrun()throwsThrowable {
103+
MultipartPayload.checkBoundarySyntax(boundary);
104+
}
105+
});
106+
assertTrue(thrown.getMessage().startsWith("{'boundary'='" +boundary +"'} has invalid syntax. Should be '"));
107+
}
121108
}

‎scribejava-httpclient-ahc/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<dependency>
2424
<groupId>org.asynchttpclient</groupId>
2525
<artifactId>async-http-client</artifactId>
26-
<version>2.10.3</version>
26+
<version>2.11.0</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>com.github.scribejava</groupId>

‎scribejava-httpclient-apache/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<dependency>
2424
<groupId>org.apache.httpcomponents</groupId>
2525
<artifactId>httpclient</artifactId>
26-
<version>4.5.10</version>
26+
<version>4.5.12</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>org.apache.httpcomponents</groupId>

‎scribejava-httpclient-okhttp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<dependency>
2424
<groupId>com.squareup.okhttp3</groupId>
2525
<artifactId>okhttp</artifactId>
26-
<version>4.2.2</version>
26+
<version>4.4.1</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>com.github.scribejava</groupId>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp