The rule S2129 complains about using the
String constructor in general and encourages to use
valueOf() instead. That’s a good approach. But in case of a
byte array argument, there is no corresponding
valueOf(). Hence the rule should not hit.
Well, you could argument, not to use
String constructor with
byte argument WITHOUT a charset. Well, that would be worth a warning, I guess. And I think, something like this is done by another rule. But there are cases, where conversion without charset makes sense.