aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-squid-java-plugin/test-resources
diff options
context:
space:
mode:
authorDinesh Bolkensteyn <dinesh@dinsoft.net>2011-10-25 12:44:15 +0200
committerDinesh Bolkensteyn <dinesh@dinsoft.net>2011-10-25 12:44:48 +0200
commit4cade605cd7a3a7dc3cd035137cd88ffa69233ec (patch)
treeb9f05c1880118a126bebcebccedabbf145b783d4 /plugins/sonar-squid-java-plugin/test-resources
parent053e6b05a29382c8256d9ac22f09a7edc53c3307 (diff)
downloadsonarqube-4cade605cd7a3a7dc3cd035137cd88ffa69233ec.tar.gz
sonarqube-4cade605cd7a3a7dc3cd035137cd88ffa69233ec.zip
SONAR-2724 SONAR-2723 Improved getter and setter detection algorithm
Diffstat (limited to 'plugins/sonar-squid-java-plugin/test-resources')
-rw-r--r--plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/properties/JavaBean.classbin798 -> 1824 bytes
-rw-r--r--plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/FixMe$1.classbin821 -> 821 bytes
-rw-r--r--plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/Todo.classbin1577 -> 1573 bytes
-rw-r--r--plugins/sonar-squid-java-plugin/test-resources/bytecode/src/properties/JavaBean.java36
4 files changed, 36 insertions, 0 deletions
diff --git a/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/properties/JavaBean.class b/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/properties/JavaBean.class
index 96067d246b9..5fbd5f8656f 100644
--- a/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/properties/JavaBean.class
+++ b/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/properties/JavaBean.class
Binary files differ
diff --git a/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/FixMe$1.class b/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/FixMe$1.class
index 95daff2fdbd..7581dc25b8a 100644
--- a/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/FixMe$1.class
+++ b/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/FixMe$1.class
Binary files differ
diff --git a/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/Todo.class b/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/Todo.class
index 1f443ef6018..ca3774bfbea 100644
--- a/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/Todo.class
+++ b/plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/Todo.class
Binary files differ
diff --git a/plugins/sonar-squid-java-plugin/test-resources/bytecode/src/properties/JavaBean.java b/plugins/sonar-squid-java-plugin/test-resources/bytecode/src/properties/JavaBean.java
index be09a2b5b99..6e858627c24 100644
--- a/plugins/sonar-squid-java-plugin/test-resources/bytecode/src/properties/JavaBean.java
+++ b/plugins/sonar-squid-java-plugin/test-resources/bytecode/src/properties/JavaBean.java
@@ -1,9 +1,14 @@
package properties;
+import java.util.ArrayList;
+
public class JavaBean {
private String name;
private boolean french;
+ ArrayList<String> firstNames = new ArrayList<String>();
+ private static String staticMember;
+ private String FirstName;
public String getName(){
return name;
@@ -24,4 +29,35 @@ public class JavaBean {
public void anotherMethod(){
}
+
+ public void addFirstName(String firstName) {
+ firstNames.add(firstName);
+ }
+
+ public String getNameOrDefault() {
+ return (name == null) ? "Freddy" : name;
+ }
+
+ public static void uselessStaticMethod() {
+
+ }
+
+ public void accessorWithABunchOfCalls() {
+ uselessStaticMethod();
+ ArrayList<String> myList = new ArrayList<String>();
+ myList.add("Banana");
+ myList.add("Peach");
+ myList.add("Strawberry");
+
+ firstNames.addAll(myList);
+ }
+
+ public void iShouldBeAStaticSetter() {
+ staticMember = "Hello!";
+ }
+
+ public String getFirstName() {
+ return FirstName;
+ }
+
}