]> source.dussan.org Git - sonarqube.git/commitdiff
Calling Field.setAccessible(true) is accepted here -> not a quality flaw
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 16 Jan 2012 16:19:55 +0000 (17:19 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 17 Jan 2012 10:29:48 +0000 (11:29 +0100)
sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java

index 6efb1507f85fdf242ed275f572e3c340ee34efd3..de459c25af15957f2d873ec5bcba5e7ca264321f 100644 (file)
@@ -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;
           }