### Elasticsearch Version

master

### Installed Plugins

N/A

### Java Version

_bundled_

### OS Version

N/A

### Problem Description

@arteam [observed](https://github.com/elastic/elasticsearch/pull/83221/files#r795474431) that `static record` is redundant, records are apparently implicitly static. I think we should make sure that Checkstyle picks this up rather than needing human involvement.

### Steps to Reproduce

Mark a record declaration as `static` and observe that `./gradlew precommit` still passes.

### Logs (if relevant)

_No response_
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/nlp/tokenizers/BpeTokenizer.java
CharTrie currentNode = this;
            int currentTokenIndex = 0;
            // f
            while (currentTokenIndex < chars.length) {
                CharTrie child = currentNode.children.get(chars[currentTokenIndex]);
                if (child == null) {
                    break;
                } else {
                    currentNode = child;
                }
                currentTokenIndex++;
            }
            // a
            while (currentTokenIndex < chars.length) {
                CharTrie childNode = new CharTrie(new HashMap<>());
                currentNode.children.put(chars[currentTokenIndex++], childNode);
                currentNode = childNode;
            }
        }
        public static CharTrie build(Collection<String> tokens) {
            CharTrie root = new CharTrie(new HashMap<>());
            for (String token : tokens) {
                char[] chars = token.toCharArray();
                root.insert(chars);
            }
            return root;
        }
    }
}