Skip to content

Commit

Permalink
updating dependencies for apache httpcomponents and fastjson
Browse files Browse the repository at this point in the history
apache content type changed to UTF8
  • Loading branch information
MikeRocke committed Sep 27, 2024
1 parent 4a87f93 commit e34e47a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion traverson4j-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dependencies {
api 'com.alibaba.fastjson2:fastjson2:2.0.0'
api 'com.alibaba.fastjson2:fastjson2:2.0.53'

}
4 changes: 2 additions & 2 deletions traverson4j-hc5/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
api 'org.apache.httpcomponents.client5:httpclient5:5.2.1',
api 'org.apache.httpcomponents.client5:httpclient5:5.4',
'com.damnhandy:handy-uri-templates:2.1.8'

testImplementation "com.github.tomakehurst:wiremock-jre8-standalone:2.35.0"
testImplementation 'org.wiremock:wiremock-standalone:3.9.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void toEntity_GivenTextBody_WithNoCharsetDefined_ReturnsStringEntityUsingApacheD
HttpEntity entity = converter.toEntity(new TextBody("data££", "text/plain"));

assertThat(entity).isInstanceOf(StringEntity.class);
assertThat(entity.getContent()).hasSameContentAs(new ByteArrayInputStream("data££".getBytes(Charsets.ISO_8859_1)));
assertThat(entity.getContent()).hasSameContentAs(new ByteArrayInputStream("data££".getBytes(Charsets.UTF_8)));
assertThat(entity.getContentType()).isEqualTo("text/plain");
}
}

0 comments on commit e34e47a

Please sign in to comment.