Skip to content

v2.13.2: add `@Contract(pure)` for `wrapper` methods, more user/IDE friendly

Compare
Choose a tag to compare
@oldratlee oldratlee released this 04 Jul 03:12
· 289 commits to master since this release

Java support

Upgrading is recommended for all users.

Note

from 2.13.x upgrade to Java 8 🚀
If you need Java 6 support, use version 2.12.x Maven Central

Change Log

Improvement

  • add @Contract(pure) for wrapper methods, more user/IDE friendly:
    • trigger IDE warning if discard wrapper result
    • for #349 by @HuangDayu

Before: 😖
image
Now: 😋
image

Cleanup/Refactor

  • refactor:
    • add missing final modifier of class
    • reorder annotations
  • docs: improve javadoc of registerThreadLocal* methods, add note for getting ThreadLocal instances by reflection

Java API Doc

https://alibaba.github.io/transmittable-thread-local/apidocs/2.13.2/index.html

Maven dependency

<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>transmittable-thread-local</artifactId>
    <version>2.13.2</version>
</dependency>