From 42d04dee44d7456fc80b1b362b045ec69a872b2d Mon Sep 17 00:00:00 2001 From: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com> Date: Wed, 14 Jul 2021 18:25:24 +0200 Subject: [PATCH] Modify rule S6210: Rephrase requirement on private element access (#213) --- rules/S6210/java/rule.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/S6210/java/rule.adoc b/rules/S6210/java/rule.adoc index a708fd49d5..ecd6bc3403 100644 --- a/rules/S6210/java/rule.adoc +++ b/rules/S6210/java/rule.adoc @@ -9,8 +9,8 @@ A compact constructor doesn't have parameters defined explicitly, parentheses ar This rule reports an issue when a canonical constructor can be easily replaced by a compact version when these requirements are met: -* the last statements are trivial field initialization -* besides this, there is no access to private members through ``++this++`` +* the last statements are trivial field initializations +* no statement reads from fields or components * there are other statements in the constructor (case covered by S6207: redundant constructors in records)