Disable check for Boolean.getBoolean()

Is it IMO completly normal to use Boolean.getBoolean(./.).

What is stated in the rule description

  | It is often mistakenly used to attempt to read user input or parse

is not a cool reason for having that rule. With such an approach we
can knock out a lot of APIs which can be misunderstood. It is the
duty of the developer to understand the API s?he is using.

The alternate way would be

'Boolean.parseBoolean(System.getProperty('xxx'))'

which is not that convenient like Boolean.getBoolean('xxx').
This commit is contained in:
Marcus Holl
2018-11-08 13:57:49 +01:00
parent 48e58f04d1
commit d1e33d6b2f
+3
View File
@@ -1,6 +1,9 @@
plugins:
codenarc:
enabled: true
checks:
BooleanGetBoolean:
enabled: false
editorconfig:
enabled: true
checks: