New checks:
ExplicitArrayForVarargs
: discourage unnecessary explicit construction of an array to provide varargs.FloggerPerWithoutRateLimit
: discourage Flogger'sperUnique
without rate limitingStringJoin
: BanString.join(CharSequence)
andString.join(CharSequence, CharSequence)
ThreadBuilderNameWithPlaceholder
: Do not allow placeholders inThread.Builder.name(String)
orname(String, int)
.
Changes:
- The return type of
ASTHelpers.asFlagSet
has changed. The previous type wasEnumSet<Flags.Flag>
, whereFlags.Flag
is an enum in the javac classFlags
. A recent JDK change has replaced that enum with a new top-level enum calledFlagsEnum
. It is not possible to changeASTHelpers.asFlagSet
in a way that would be type-safe and compatible with the enums from JDKs both before and after the change. Instead, the method now returnsImmutableSet<String>
, where the strings come from thetoString()
of the enum constants. That means they are"native"
,"abstract"
, etc. - Flag
IO.print[ln]()
inSystemOut
.
Full changelog: v2.41.0...v2.42.0