diff --git a/CHANGELOG.md b/CHANGELOG.md index 58d56de8..61ad7863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +### Changed +- Return back `ContentType#parse` method for backward compatibility, by @HardNorth ## [5.2.12] ### Changed diff --git a/src/main/java/com/epam/reportportal/utils/http/ContentType.java b/src/main/java/com/epam/reportportal/utils/http/ContentType.java index 6160be25..ecc4cd6f 100644 --- a/src/main/java/com/epam/reportportal/utils/http/ContentType.java +++ b/src/main/java/com/epam/reportportal/utils/http/ContentType.java @@ -126,6 +126,19 @@ public static String stripMediaType(@Nullable String contentType) { return mimeType.isEmpty() ? null : mimeType; } + /** + * Extract Media Type from a Content-Type header. + * + * @param contentType Content-Type header value + * @return Media Type + * @deprecated Use {@link #stripMediaType(String)} instead + */ + @Deprecated + @Nullable + public static String parse(@Nullable String contentType) { + return stripMediaType(contentType); + } + /** * Check if the Media Type is known. *