aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-squid-java-plugin
diff options
context:
space:
mode:
authorDinesh Bolkensteyn <dinesh@dinsoft.net>2011-10-24 22:35:28 +0200
committerDinesh Bolkensteyn <dinesh@dinsoft.net>2011-10-24 22:35:28 +0200
commitb01742afa2b2a2e14af43853b635b113f7f0a77b (patch)
tree30db2b8a7d9e43f7e60acb4af92cd72f68a1c305 /plugins/sonar-squid-java-plugin
parent7587ccc73f9562b4b3e3be6e8081859c8c1b4116 (diff)
downloadsonarqube-b01742afa2b2a2e14af43853b635b113f7f0a77b.tar.gz
sonarqube-b01742afa2b2a2e14af43853b635b113f7f0a77b.zip
SONAR-2038 LCOM4 value is incorrect when mixing getter/setter and direct field access
Diffstat (limited to 'plugins/sonar-squid-java-plugin')
-rw-r--r--plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/bin/LCOM4AccessorMethodAndField.classbin0 -> 638 bytes
-rw-r--r--plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/src/LCOM4AccessorMethodAndField.java19
2 files changed, 19 insertions, 0 deletions
diff --git a/plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/bin/LCOM4AccessorMethodAndField.class b/plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/bin/LCOM4AccessorMethodAndField.class
new file mode 100644
index 00000000000..fe462af8697
--- /dev/null
+++ b/plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/bin/LCOM4AccessorMethodAndField.class
Binary files differ
diff --git a/plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/src/LCOM4AccessorMethodAndField.java b/plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/src/LCOM4AccessorMethodAndField.java
new file mode 100644
index 00000000000..799619d244b
--- /dev/null
+++ b/plugins/sonar-squid-java-plugin/test-resources/bytecode/lcom4/src/LCOM4AccessorMethodAndField.java
@@ -0,0 +1,19 @@
+
+
+public class LCOM4AccessorMethodAndField {
+
+ public static String field;
+
+ public String getField() {
+ return field;
+ }
+
+ public String doSomethingWithFieldDirect() {
+ return field;
+ }
+
+ public String doSomethingWithFieldIndirect() {
+ return getField();
+ }
+
+}