Class UseStandardCharsetsRule

All Implemented Interfaces:
AstVisitor, JavaVisitor, Rule, PropertySource

public class UseStandardCharsetsRule extends AbstractJavaRulechainRule
Starting with Java 7, StandardCharsets provides constants for common Charset objects, such as UTF-8. Using the constants is less error-prone, and can provide a small performance advantage compared to `Charset.forName(...)` or `String.getBytes(String)` since no scan across the internal `Charset` caches is needed.
Since:
6.34.0 (as XPath) / 7.25.0 (as Java)