Skip to content

Releases: twitter/util

Util 20.8.1

27 Aug 17:35

Choose a tag to compare

20.8.1

New Features

  • util-mock: Introduce mockito-scala based mocking integration. Fix up and update mockito testing dependencies:
    • mockito-all:1.10.19 to mockito-core:3.3.3
    • scalatestplus:mockito-1-10:3.1.0.0 to scalatestplus:mockito-3-2:3.1.2.0 b2fb4b3a
  • util-app: Add support for flags of Java Enum types. 4657258d

Util 20.8.0 (DO NOT USE)

12 Aug 16:00

Choose a tag to compare

20.8.0

New Features

  • util-stats: Store MetricSchemas in InMemoryStatsReceiver to enable further testing. c305712e
  • util-core: c.t.u.Var.Observer is now public. This allows scala users to extend the Var trait
    as has been the case for Java users. ee1cebcf
  • util-core: Added two new methods to c.t.u.Duration and c.t.u.Time: .fromHours and .fromDays. 955f2ce9

Runtime Behavior Changes

  • util-app: Treat empty strings as empty collections in Flag[Seq[_]], Flag[Set[_]],
    Flag[java.util.List[_]], and Flag[java.util.Set[_]]. They were treated as collections
    with single element, empty string, before. 43f83d22

Util 20.7.0

22 Jul 16:35

Choose a tag to compare

New Features

  • util-app: Add ability to observe App lifecycle events. 2d2e6803

Util 20.6.0

24 Jun 22:14

Choose a tag to compare

New Features

  • util-stats: Add two new Java-friendly methods to StatsReceiver (addGauge and provideGauge)
    that take java.util.function.Supplier as well as list vararg argument last to enable better
    developers' experience. 77c76e41
  • util-app: Add a Flaggable instance for java.time.LocalTime. 19f13a07
  • util-app: Add two new methods to retrieve flag's unparsed value (as string): Flag.getUnparsed
    and Flag.getWithDefaultUnparsed. 4ef3c9b9

Util 20.5.0

29 May 21:14

Choose a tag to compare

New Features

  • util-security: Moved Credentials from util-core: c.t.util.Credentials => c.t.util.security.Credentials. c34cd8ef

Breaking API Changes

  • util-core: Move Credentials to util-security: c.t.util.Credentials => c.t.util.security.Credentials. c34cd8ef

  • util-core: Change the namespace of ActivitySource and its derivatives to com.twitter.io as its no longer considered experimental since the code has changed minimally in the past 5 years. 3e939701

Util 20.4.1

26 Apr 06:45

Choose a tag to compare

New Features

  • util-tunable: ConfigurationLinter accepts a relative path. 71d39d80

Util 20.4.0 (DO NOT USE)

02 Apr 16:56

Choose a tag to compare

New Features

  • util-core: When looking to add idempotent close behavior, users should mix in CloseOnce to
    classes which already extend (or implement) Closable, as mixing in ClosableOnce leads to
    compiler errors. ClosableOnce.of can still be used to create a ClosableOnce proxy of an
    already instantiated Closable. Classes which do not extend Closable can still
    mix in ClosableOnce. 43671464

Breaking API Changes

  • util-hashing: Rename
    c.t.hashing.KetamaNode => HashNode,
    c.t.hashing.KetamaDistributor => ConsistentHashingDistributor.
    f595ed97

Util 20.3.0

08 Mar 19:27

Choose a tag to compare

Breaking API Changes

  • util-core: The system property com.twitter.util.UseLocalInInterruptible no longer
    can be used to modulate which Local state is present when a Promise is interrupted.
    da638942

  • util-core: Future.unapply has been removed. Use Future.poll to retrieve Future's
    state. 26beb347

Runtime Behavior Changes

  • util-core: Promises now exclusively use the state local to setting the interrupt
    handler when raising on a Promise. da638942

New Features

  • util-app: Add c.t.util.app.App#onExitLast to be able to provide better Java
    ergonomics for designating a final exit function. d523c0c5

  • util-core: Add c.t.io.Reader.concat to conveniently concatenate a collection
    of Reader to a single Reader. 68b28ac1

Bug Fixes

  • util-logging: Add a missing _* that could result in exceptions when using the
    Logger.apply(Level, Throwable, String, Any*) signature. c875d359

Util 20.1.0

29 Jan 21:27

Choose a tag to compare

No Changes

Util 19.12.0

13 Dec 16:15

Choose a tag to compare

New Features

  • util-stats: Introduces c.t.f.stats.LazyStatsReceiver which ensures that counters and histograms
    don't export metrics until after they have been incred or added at least once. 36d82071
  • util-core: Introduce Time#nowNanoPrecision to produce nanosecond resolution timestamps in JDK9
    or later. e6f39b07
  • util-core: Introduce Future#toCompletableFuture, which derives a CompletableFuture from
    a com.twitter.util.Future to make integrating with Java APIs simpler. 26427919

Runtime Behavior Changes

  • util: Upgrade to jackson 2.9.10 and jackson-databind 2.9.10.1 c6e3f317

Breaking API Changes

  • util-core: The lightly used com.twitter.util.JavaSingleton trait has been removed. It
    did not work as intended. Users should provide Java friendly objects, classes, and methods
    instead. 19a6af44

Deprecations

  • util-test: The c.t.logging.TestLogging mixin has been deprecated. Users are encouraged to
    move to slf4j for logging and minimize dependencies on com.twitter.logging in general, as
    it is intended to be replaced entirely by slf4j. 0dc6641c

Bug Fixes

  • util-core: Future#toJavaFuture incorrectly threw the exception responsible for failing it,
    instead of a j.u.c.ExecutionException wrapping the exception responsible for failing it.
    26427919