From: Simon Brandhof Date: Mon, 16 Jan 2012 16:19:55 +0000 (+0100) Subject: Calling Field.setAccessible(true) is accepted here -> not a quality flaw X-Git-Tag: 2.14~297 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d231aef15a9f8bf4faabac179b73f33731a64c06;p=sonarqube.git Calling Field.setAccessible(true) is accepted here -> not a quality flaw --- diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java index 6efb1507f85..de459c25af1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java @@ -49,7 +49,7 @@ public final class FieldUtils { for (Field declaredField : c.getDeclaredFields()) { if (!Modifier.isPublic(declaredField.getModifiers())) { if (forceAccess) { - declaredField.setAccessible(true); + declaredField.setAccessible(true);//NOSONAR only works from sufficiently privileged code } else { continue; }