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

MSAL

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

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

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.SharedInputBuffer to org.apache.hc.core5.http.nio.support.classic.SharedInputBuffer
  3. Adds offset and length arguments to the read method of SharedInputBuffer
  4. Delete method argument 1 in methods org.apache.hc.core5.http.nio.support.classic.SharedInputBuffer <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.SharedInputBuffer <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.SharedInputBuffer available() to capacity
  8. Change method name org.apache.hc.core5.http.nio.support.classic.SharedInputBuffer close() to markEndStream
  9. Change method name org.apache.hc.core5.http.nio.support.classic.SharedInputBuffer shutdown() to abort
  10. Add comment to method invocations
  11. Change type org.apache.http.nio.util.ContentInputBuffer to org.apache.hc.core5.http.nio.support.classic.ContentInputBuffer
  12. Add comment to method invocations