diff options
author | Dinesh Bolkensteyn <dinesh@dinsoft.net> | 2011-10-25 12:44:15 +0200 |
---|---|---|
committer | Dinesh Bolkensteyn <dinesh@dinsoft.net> | 2011-10-25 12:44:48 +0200 |
commit | 4cade605cd7a3a7dc3cd035137cd88ffa69233ec (patch) | |
tree | b9f05c1880118a126bebcebccedabbf145b783d4 /plugins/sonar-squid-java-plugin/test-resources | |
parent | 053e6b05a29382c8256d9ac22f09a7edc53c3307 (diff) | |
download | sonarqube-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.class | bin | 798 -> 1824 bytes | |||
-rw-r--r-- | plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/FixMe$1.class | bin | 821 -> 821 bytes | |||
-rw-r--r-- | plugins/sonar-squid-java-plugin/test-resources/bytecode/bin/tags/impl/Todo.class | bin | 1577 -> 1573 bytes | |||
-rw-r--r-- | plugins/sonar-squid-java-plugin/test-resources/bytecode/src/properties/JavaBean.java | 36 |
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 Binary files differindex 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 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 Binary files differindex 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 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 Binary files differindex 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 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; + } + } |