From d231aef15a9f8bf4faabac179b73f33731a64c06 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 16 Jan 2012 17:19:55 +0100 Subject: [PATCH] Calling Field.setAccessible(true) is accepted here -> not a quality flaw --- .../src/main/java/org/sonar/api/utils/FieldUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5