Twitter Util v19.11.0 Release Notes

Release Date: 2019-11-06 // 6 days ago
  • 🆕 New Features

    👍 util: Add initial support for JDK 11 compatibility. e6970ed1

    util-core: Created public method Closable.stopCollectClosablesThread that stops CollectClosables
    thread. a8260998

    util-core: Introduced Reader.fromIterator to create a Reader from an iterator. It is not
    recommended to call iterator.next() after creating a Reader from it. Doing so will affect the
    behavior of Reader.read() because it will skip the value returned from iterator.next.
    d1b42f4b

    ⚙ Runtime Behavior Changes

    • ⬆️ util: Upgrade to caffeine 2.8.0 f35ae591

    💥 Breaking API Changes

    • util-core: Add c.t.io.BufReader.readAll to consume a Reader[Buf] and concat values to a Buf.
      Replace c.t.io.Reader.readAll with Reader.readAllItems, the new API consumes a generic Reader[T],
      and return a Seq of items. a47a219b
    • 🚚 util-core: Moved c.t.io.Reader.chunked to c.t.io.BufReader.chunked, and Reader.framed to
      BufReader.framed. 459038f9
    • 🚚 util-core: Moved c.t.io.Reader.copy to c.t.io.Pipe.copy, and Reader.copyMany to
      Pipe.copyMany. 5562ebf3

    🗄 Deprecations

    • util-core: Mark c.t.io.BufReaders, c.t.io.Bufs, c.t.io.Readers, and c.t.io.Writers as
      🚚 Deprecated. These classes will no longer be needed, and will be removed, after 2.11 support is
      ⬇️ dropped. 844fe24d
    • 🚚 util-stats: Removed deprecated methods stat0 and counter0 from StatsReceiver. 5119e65c

Previous changes from v19.10.0

  • ⚙ Runtime Behavior Changes

    • util-core: When a computation from FuturePool is interrupted, its promise is
      set to the interrupt, wrapped in a j.u.c.CancellationException. This wrapper
      was introduced because, all interrupts were once CancellationExceptions. In
      RB_ID=98612, this changed to allow the user to raise specific exceptions as
      👻 interrupts, and in the aid of compatibility, we wrapped this raised exception
      🚚 in a CancellationException. This change removes the wrapper and fails the
      👻 promise directly with the raised exception. This will affect users that
      explicitly handle CancellationException. d95914f8

    🐛 Bug Fixes

    • 🛠 util-core: Fixed bug in c.t.io.Reader.framed where if the framer didn't emit a List the
      emitted frames were skipped. aedc943e
    • util-hashing: Fix a bug where partitionIdForHash was returning incosistent values w.r.t
      entryForHash in KetamaDistributor. c66080b6