Migrate Apache HttpCore Nio Output Buffer classes to Apache HttpCore 5.x

MSAL

Mapping of specifically *OutputBuffer classes of Apache HttpCore 5.x from Apache HttpCore Nio 4.4.x.

org.openrewrite.apache.httpclient5.UpgradeApacheHttpCore_5_NioOutputBuffers
mod run . --recipe=org.openrewrite.apache.httpclient5.UpgradeApacheHttpCore_5_NioOutputBuffers

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Add comment to method invocations
  2. Change type org.apache.http.nio.util.SharedOutputBuffer to org.apache.hc.core5.http.nio.support.classic.SharedOutputBuffer
  3. Adds offset and length arguments to the write method of SharedOutputBuffer
  4. Delete method argument 1 in methods org.apache.hc.core5.http.nio.support.classic.SharedOutputBuffer <constructor>(int, org.apache.http.nio.IOControl, org.apache.http.nio.util.ByteBufferAllocator)
  5. Delete method argument 1 in methods org.apache.hc.core5.http.nio.support.classic.SharedOutputBuffer <constructor>(int, org.apache.http.nio.util.ByteBufferAllocator)
  6. Add comment to method invocations
  7. Change method name org.apache.hc.core5.http.nio.support.classic.SharedOutputBuffer available() to capacity
  8. Change method name org.apache.hc.core5.http.nio.support.classic.SharedOutputBuffer close() to abort
  9. Change method name org.apache.hc.core5.http.nio.support.classic.SharedOutputBuffer shutdown() to abort
  10. Add comment to method invocations
  11. Change type org.apache.http.nio.util.ContentOutputBuffer to org.apache.hc.core5.http.nio.support.classic.ContentOutputBuffer
  12. Add comment to method invocations