Skip to content

Commit 360bfec

Browse files
committed
Dependencies update
1 parent 7433663 commit 360bfec

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Changed
5+
- Client version updated on [5.2.13](https://github.com/reportportal/client-java/releases/tag/5.2.13), by @HardNorth
6+
### Removed
7+
- `OkHttp` dependency, by @HardNorth
8+
- JSR-305 dependency, by @HardNorth
49

510
## [5.2.1]
611
### Changed

build.gradle

+3-4
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@ repositories {
3737
}
3838

3939
dependencies {
40-
api 'com.epam.reportportal:client-java:5.2.4'
41-
api 'com.google.code.findbugs:jsr305:3.0.2'
40+
api 'com.epam.reportportal:client-java:5.2.13'
4241
api "io.cucumber:cucumber-java:${project.cucumber_version}"
4342

44-
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
4543
implementation 'org.slf4j:slf4j-api:2.0.7'
4644

47-
testImplementation 'com.epam.reportportal:agent-java-test-utils:0.0.2'
45+
testImplementation 'com.epam.reportportal:agent-java-test-utils:0.0.6'
4846

47+
testImplementation 'com.squareup.okhttp3:okhttp:4.12.0'
4948
testImplementation 'org.aspectj:aspectjweaver:1.9.19'
5049
testImplementation 'org.hamcrest:hamcrest-core:2.2'
5150
testImplementation 'org.mockito:mockito-core:3.3.3'

src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java

+2-10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.epam.reportportal.service.tree.TestItemTree;
2828
import com.epam.reportportal.utils.*;
2929
import com.epam.reportportal.utils.files.ByteSource;
30+
import com.epam.reportportal.utils.http.ContentType;
3031
import com.epam.reportportal.utils.markdown.MarkdownUtils;
3132
import com.epam.reportportal.utils.properties.SystemAttributesExtractor;
3233
import com.epam.ta.reportportal.ws.model.FinishExecutionRQ;
@@ -46,7 +47,6 @@
4647
import gherkin.pickles.PickleTable;
4748
import gherkin.pickles.PickleTag;
4849
import io.reactivex.Maybe;
49-
import okhttp3.MediaType;
5050
import org.apache.commons.lang3.tuple.Pair;
5151
import org.slf4j.Logger;
5252
import org.slf4j.LoggerFactory;
@@ -574,15 +574,7 @@ private static String getDataType(@Nonnull byte[] data, @Nullable String name) {
574574
* @param data data to attach
575575
*/
576576
protected void embedding(@Nullable String name, String mimeType, byte[] data) {
577-
String type = ofNullable(mimeType).filter(m -> {
578-
try {
579-
MediaType.get(m);
580-
return true;
581-
} catch (IllegalArgumentException e) {
582-
LOGGER.warn("Incorrect media type '{}'", m);
583-
return false;
584-
}
585-
}).orElseGet(() -> getDataType(data, name));
577+
String type = ofNullable(mimeType).filter(ContentType::isValidType).orElseGet(() -> getDataType(data, name));
586578
String attachmentName = ofNullable(name).filter(m -> !m.isEmpty())
587579
.orElseGet(() -> ofNullable(type).map(t -> t.substring(0, t.indexOf("/"))).orElse(""));
588580
ReportPortal.emitLog(new ReportPortalMessage(ByteSource.wrap(data), type, attachmentName),

src/test/java/com/epam/reportportal/cucumber/EmbeddingTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void verify_text_embedding() {
156156
List<String> types = getTypes(logCaptor, logs);
157157

158158
assertThat(types, hasSize(3));
159-
assertThat(types, containsInAnyOrder("text/plain", "image/png", "application/octet-stream"));
159+
assertThat(types, containsInAnyOrder("text/plain", "image/png", "text/plain"));
160160
}
161161

162162
@Test

0 commit comments

Comments
 (0)