Releases: michaelgantman/Mgnt
1.7.0.5 Readme re-write and dependencies Versions upgrade
This release contains no new features or bug fixes. It addresses a version upgrade for fasterxml jackson dependencies. They are upgraded from version 2.19.1 to version 2.21.1 due to security vulnerability. So this is a minor release. However, there is a major re-write of the README also included into this release. And the reason is, that over some time there were several in-depth technical articles written and published. They all deal with this library, exploring various features. Those articles greately enhance over-all information about this library and should be considered as part of this library documentation. So, the README file now addresses this issue and all relevant articles with links and short descriptions are now listed as part of the documentation. In this way it is a major upgrade not of the library itself but its overall documentation. So, while it is considered to be a minor release it is actually major step in over-all quality
1.7.0.4 Version Range overlap bug fix
This release contains a bug fix for method isOverlap(VersionRange otherRange) of VersionRange class. The bug was that for the case when VersionRange passed as a parameter (otherRange) fully incapsulates the VersionRange that invoked the method than the result would be false, which is incorrect. (Just to clarify - if the invoking range value is [2.6.1 - 2.9.2] and parameter range value is [1.5.3 - 3.8.5] than the bug would occur and return false where it should have returned true.
Besides this fix there is a minor fix in Javadoc for 2 methods introduced in previous release (1.7.0.3). Those methods toDuration() of class TimeInterval and parseStringToDuration() of class TextUtils both throw java.lang.IllegalArgumentException but it was not reflected in the method signature in Javadoc. And now this is fixed as well.
1.7.0.3 Parsing Time Interval String to Duration
This release has the followin g new features:
- Class TextUtils now has a new method
public static java.time.Duration parseStringToDuration(java.lang.String valueStr)This method works the same aspublic static TimeInterval parseStringToTimeInterval(java.lang.String valueStr)with the difference that it parses time interval string into instance ofjava.time.Durationclass as opposed toTimeIntervalclass. This allows to parse time interval string onto standard java class as opposed to proprietary class that is part of this library. This allows for more seamless integration into standard java code. - Class TimeInterval now has a new method
public java.time.Duration toDuration()that allows conversion of an instance of TimeInterval class into standard jdk providedjava.time.Durationclass
Also in class TextUtils a method public static TimeInterval parsingStringToTimeInterval(java.lang.String valueStr) throws java.lang.IllegalArgumentException that was deplrecated long time ago is now removed. Just a reminder that its replacement is public static TimeInterval parseStringToTimeInterval(java.lang.String valueStr) method
1.7.0.2 Dependencies Versions upgrade
This minor release contains no new features. It just upgrades some dependencies to a newer versions. It was necessitated by some vulnerability found in Apache Commons Lang old version 3.12.0
. Apache Commons Lang 3.12.0 is vulnerable to Uncontrolled Recursion when processing long inputs. So it was upgraded to 3.18.0. Read more about it at Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs. There were some other dependencies versions upgrades and minor typo fix in Javadoc.
1.7.0.1 Minor logging message bug fix for HttpClient
This very minor release contains just one big fix for a small logging message bug in HttpClient. For a particular case when an error occurs while sending an HTTP request and there is an HTTP response code but no response message, then there is a space missing in the error message in the log between the HTTP response code and the Exception error message. This is a minor bug. But... a bug is a bug and now it is fixed
1.7.0.0 Major HTTP client and stacktace filtering improvements
This release contains some significant improvements of existing features. Below is the list of changes:
- Class TimeInterval now implements Comparable interface. The instances are compared based on the length of time interval they represent.
- Stacktrace filtering feature in class
TextUtilsnow supports multiple "relevant package" prefixes. This is a major improvement That some clients have been asking for. (See method description public static java.lang.String getStacktrace(java.lang.Throwable e, boolean cutTBS, java.lang.String... relevantPackages). Previously stacktrace filtering was based on a single prefix only that determined which parts of the stacktrace are relevant and which are not. Starting from this version multiple prefixes are supported. It is a corner-case scenario but it is an important one. - And last but certainly not least is
HttpClientimprovement. In previous versions, this class was not thread-safe both because it stored state (pre-set headers) and because itssendHttpRequest(...)methods returned only the actual content of the response but the metadata (such as response headers, error code, and message) were stored as state as well, and thus every subsequent request would override that data making this class (up until this version) only suitable for a single request at the time (even in the same thread). Now methodssendHttpRequest(...)return not just a response content (String or binary data) but a class that contains both content and metadata (response headers, error code, and message) for this particular response (See class ResponseHolder used as return value for allsendHttpRequest(...)methods). So, whileHttpClientclass is still, strictly speaking, not thread-safe it is by design and it is now more mature special purpose HTTP client. It holds the state that is shared by requests such as request headers. This class is intended for multiple repeated requests that share the same state. So, once this class is instantiated and its state is set - as long as the state is not changed it is thread-safe for issuing multiple requests from multiple threads. (See details in Javadoc description for HttpClient)
1.6.0.6 Method chaining support for HttpClient
Added method chaining support for HttpClient for header setter methods. so now methods clearAllRequestProperties(), removeRequestProperty(), setContentType() and setRequestHeader() return the instance of HttpClient so they could be chained. So now it is possible to write:
new HttpClient()
.setContentType(...)
.setRequestHeader(...)
.setRequestHeader(...)
.setRequestHeader(...)
.sendHttpRequest(...);
1.6.0.5 Faster XML vulnerabilities fix
This release contains no new features or bug fixes. It upgrades Faster XML library to the newest version that fixes a recently discovered vulnerability
1.6.0.4 HttpClient fix for textual body
This is a bug fix release. It fixes a bug for HttpClient for methods sendHttpRequest(...) and sendHttpRequestForBinaryResponse(...) that allow passing a textual body content for request (those method that have the last parameter String data). When Textual body content was converted into bytes just before sending request the conversion added some 0-value bytes at the end and that caused request to fail in some servers. This is fixed in this release.
Another change is that a new dependency was added:
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
This is to include classes such as javax.annotation.PostConstruct and javax.annotation.PreDestroy. Up until java version 11 those classes were part of JDK, but in the later versions they were excluded and for seamless use of the library the above dependency was added so it would work without the need to add such dependency externally with later java versions
1.6.0.3 Json-Jackson vulnerability fix
jackson-databind is a data-binding package for the Jackson Data Processor. jackson-databind allows a Java stack overflow exception and denial of service via a large depth of nested objects. So the upgrade to the latest version fixes the issue