RESTEasy 6.2.8.Final Release

By James R. Perkins | March 22, 2024

Today we’d like to announce the release of RESTEasy 6.2.8.Final. This release contains some bug fixes as well as some notable changes in behavior.

Client Changes

In RESTEASY-3470 it was found that clients may leave connections open longer than expected. The fix was to evict stale or closed connections after 60 seconds. Note this timeout is hard-coded.

In big news, we’ve deprecated the backing Apache HTTP Client. The reason for doing this is we want to be able to replace this client with something newer that has HTTP/2 support. This client, for at least the 6.2 stream, will continue to work and be the default. However, this may not be true in an undetermined future release. We will however make an announcement before we change the default.

EntityPart

In Jakarta REST 3.1 an EntityPart API was introduced. In the JavaDoc the EntityPart.getContent(Class) and EntityPart.getContent(GenericType) are only allowed to be invoked once. We’ve added the requirement of that restriction to RESTEasy. See RESTEASY-3468 for details.

Previously when using an EntityPart as a @FormParam it was required to register the jakarta.ws.rs.core.Application as a servlet with a multipart-config. This was not user-friendly and not well document. In RESTEASY-363 we solved this and now @FormParam’s can use the entity parts without the need to define a multipart-config on the servlet.

Exception Mapper

Previously in RESTEASY-3380 a JsonProcessingExceptionMapper was created to handle errors from Jackson when serializing/deserializing objects. We mistakenly returned a 500 error instead of a 400. RESTEASY-3443 corrects this by returning a 400 (Bad Request) for these types of errors.

Security

While we did not seem to be affected by CVE-2024-2172, we did upgrade mime4j as it was one easy to do and two will stop security scanners from triggering issues.

Testing

Not user facing but, it’s worth noting a major change we have made to the RESTEasy testing for both the main branch and the 6.2 branches. We’ve migrated from JUnit 4 to JUnit 5. This was a major task and the results have been great. Just note if, for any reason, you use utilities from the RESTEasy test suite, they will now require JUnit 5.

Finally

As always, feedback is welcome. Stay safe, and, depending on where you are, stay warm or be cool.

         

YourKit
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor