diff --git a/README.md b/README.md index 5e508f055c..6a1bf09db5 100644 --- a/README.md +++ b/README.md @@ -74,11 +74,11 @@ $ ./ktlint -R diktat.jar --disabled_rules=standard "dir/your/dir/**/*.kt" To **autofix** all code style violations, use `-F` option. ## Run with Maven using diktat-maven-plugin -:heavy_exclamation_mark: If you are using **Java 16+**, you need to add `--add-opens java.base/java.util=ALL-UNNAMED` flag to the JVM. For more information, see: https://github.com/pinterest/ktlint/issues/1195 +:heavy_exclamation_mark: If you are using **Java 16+**, you need to add `--add-opens java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED` flag to the JVM. For more information, see: https://github.com/pinterest/ktlint/issues/1195 This can be done by setting `MAVEN_OPTS` variable: ``` -export MAVEN_OPTS="--add-opens java.base/java.util=ALL-UNNAMED" +export MAVEN_OPTS="--add-opens java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED" ``` This plugin is available since version 0.1.3. You can see how it is configured in our project for self-checks: [pom.xml](pom.xml).