File tree Expand file tree Collapse file tree 6 files changed +16
-16
lines changed
aws-cognito/http-client-authtoken
src/main/java/io/avaje/aws/client/cognito
main/java/io/avaje/http/client
test/java/io/avaje/http/client Expand file tree Collapse file tree 6 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 23
23
<dependency >
24
24
<groupId >io.avaje</groupId >
25
25
<artifactId >avaje-json-core</artifactId >
26
- <version >3.0-RC6 </version >
26
+ <version >3.0-RC7 </version >
27
27
</dependency >
28
28
29
29
<!-- test dependencies -->
30
30
<dependency >
31
31
<groupId >io.avaje</groupId >
32
32
<artifactId >avaje-json-node</artifactId >
33
- <version >3.0-RC6 </version >
33
+ <version >3.0-RC7 </version >
34
34
<scope >test</scope >
35
35
</dependency >
36
36
Original file line number Diff line number Diff line change 4
4
import io .avaje .http .client .AuthTokenProvider ;
5
5
import io .avaje .http .client .BasicAuthIntercept ;
6
6
import io .avaje .http .client .HttpClientRequest ;
7
- import io .avaje .json .simple . SimpleMapper ;
7
+ import io .avaje .json .mapper . JsonMapper ;
8
8
9
9
import java .net .http .HttpResponse ;
10
10
import java .time .Instant ;
@@ -47,7 +47,7 @@ public AuthTokenProvider build() {
47
47
48
48
private static final class Provider implements AuthTokenProvider {
49
49
50
- private static final SimpleMapper MAPPER = SimpleMapper .builder ().build ();
50
+ private static final JsonMapper MAPPER = JsonMapper .builder ().build ();
51
51
52
52
private final String url ;
53
53
private final String clientId ;
Original file line number Diff line number Diff line change 36
36
<dependency >
37
37
<groupId >io.avaje</groupId >
38
38
<artifactId >avaje-jsonb</artifactId >
39
- <version >3.0-RC6 </version >
39
+ <version >3.0-RC7 </version >
40
40
<optional >true</optional >
41
41
</dependency >
42
42
43
43
<dependency >
44
44
<groupId >io.avaje</groupId >
45
45
<artifactId >avaje-json-node</artifactId >
46
- <version >3.0-RC6 </version >
46
+ <version >3.0-RC7 </version >
47
47
<scope >test</scope >
48
48
</dependency >
49
49
Original file line number Diff line number Diff line change 1
1
package io .avaje .http .client ;
2
2
3
3
import io .avaje .http .client .SingleBodyAdapter .JsonBodyAdapter ;
4
- import io .avaje .json .simple . SimpleMapper ;
4
+ import io .avaje .json .mapper . JsonMapper ;
5
5
6
6
import java .util .List ;
7
7
@@ -10,7 +10,7 @@ final class DSingleAdapter implements BodyAdapter {
10
10
11
11
private final ReaderWriter <?> adapter ;
12
12
13
- static BodyAdapter of (SimpleMapper .Type <?> jsonType ) {
13
+ static BodyAdapter of (JsonMapper .Type <?> jsonType ) {
14
14
return new DSingleAdapter (toAdapter (jsonType ));
15
15
}
16
16
@@ -22,7 +22,7 @@ private DSingleAdapter(JsonBodyAdapter<?> source) {
22
22
this .adapter = new ReaderWriter <>(source );
23
23
}
24
24
25
- private static <T > JsonBodyAdapter <T > toAdapter (SimpleMapper .Type <T > jsonType ) {
25
+ private static <T > JsonBodyAdapter <T > toAdapter (JsonMapper .Type <T > jsonType ) {
26
26
return new SimpleJsonAdapter <>(jsonType );
27
27
}
28
28
@@ -72,9 +72,9 @@ public BodyContent write(T bean) {
72
72
73
73
private static final class SimpleJsonAdapter <T > implements JsonBodyAdapter <T > {
74
74
75
- private final SimpleMapper .Type <T > jsonType ;
75
+ private final JsonMapper .Type <T > jsonType ;
76
76
77
- public SimpleJsonAdapter (SimpleMapper .Type <T > jsonType ) {
77
+ public SimpleJsonAdapter (JsonMapper .Type <T > jsonType ) {
78
78
this .jsonType = jsonType ;
79
79
}
80
80
Original file line number Diff line number Diff line change 1
1
package io .avaje .http .client ;
2
2
3
- import io .avaje .json .simple . SimpleMapper ;
3
+ import io .avaje .json .mapper . JsonMapper ;
4
4
5
5
/**
6
6
* A BodyAdapter that supports converting the request/response body to a single type.
@@ -25,7 +25,7 @@ static BodyAdapter create(JsonBodyAdapter<?> jsonAdapter) {
25
25
* @param jsonType The only type supported to read or write the body content.
26
26
* @return The BodyAdapter that the HttpClient can use.
27
27
*/
28
- static BodyAdapter create (SimpleMapper .Type <?> jsonType ) {
28
+ static BodyAdapter create (JsonMapper .Type <?> jsonType ) {
29
29
return DSingleAdapter .of (jsonType );
30
30
}
31
31
Original file line number Diff line number Diff line change 1
1
package io .avaje .http .client ;
2
2
3
3
import com .fasterxml .jackson .databind .ObjectMapper ;
4
- import io .avaje .json .simple . SimpleMapper ;
4
+ import io .avaje .json .mapper . JsonMapper ;
5
5
import org .example .webserver .ErrorResponse ;
6
6
import org .example .webserver .HelloDto ;
7
7
import org .junit .jupiter .api .Test ;
@@ -821,9 +821,9 @@ void get_bean_404() {
821
821
822
822
@ Test
823
823
void singleBodyAdapter_returningBean () {
824
- var simpleMapper = SimpleMapper .builder ().build ();
824
+ var mapper = JsonMapper .builder ().build ();
825
825
826
- SimpleMapper .Type <HelloDto > type = simpleMapper .type (new HelloDtoAdapter ());
826
+ JsonMapper .Type <HelloDto > type = mapper .type (new HelloDtoAdapter ());
827
827
BodyAdapter bodyAdapter = SingleBodyAdapter .create (type );
828
828
HttpClient client = client (bodyAdapter );
829
829
You can’t perform that action at this time.
0 commit comments