{"action":"created","issue":{"url":"https://api.github.com/repos/teamed/qulice/issues/540","labels_url":"https://api.github.com/repos/teamed/qulice/issues/540/labels{/name}","comments_url":"https://api.github.com/repos/teamed/qulice/issues/540/comments","events_url":"https://api.github.com/repos/teamed/qulice/issues/540/events","html_url":"https://github.com/teamed/qulice/issues/540","id":123729084,"number":540,"title":"Upgrade to PMD 5.4.1","user":{"login":"mkordas","id":5467276,"avatar_url":"https://avatars.githubusercontent.com/u/5467276?v=3","gravatar_id":"","url":"https://api.github.com/users/mkordas","html_url":"https://github.com/mkordas","followers_url":"https://api.github.com/users/mkordas/followers","following_url":"https://api.github.com/users/mkordas/following{/other_user}","gists_url":"https://api.github.com/users/mkordas/gists{/gist_id}","starred_url":"https://api.github.com/users/mkordas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkordas/subscriptions","organizations_url":"https://api.github.com/users/mkordas/orgs","repos_url":"https://api.github.com/users/mkordas/repos","events_url":"https://api.github.com/users/mkordas/events{/privacy}","received_events_url":"https://api.github.com/users/mkordas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/teamed/qulice/labels/30%20mins","name":"30 mins","color":"eb6421"},{"url":"https://api.github.com/repos/teamed/qulice/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/teamed/qulice/labels/DEV","name":"DEV","color":"bfd4f3"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-23T22:03:01Z","updated_at":"2016-01-13T13:01:36Z","closed_at":null,"body":"Qulice currently uses PMD 5.3.4. Let's upgrade to the newest version and we'll get those things:\r\n* https://pmd.github.io/pmd-5.3.5/overview/changelog.html\r\n* https://pmd.github.io/pmd-5.4.0/overview/changelog.html\r\n* https://pmd.github.io/pmd-5.4.1/overview/changelog.html\r\n\r\nI'd suggest to make sure that the following new checks are enabled after update:\r\n* Basic: SimplifiedTernary (rulesets/java/basic.xml/SimplifiedTernary)\r\nTernary operator with a boolean literal can be simplified with a boolean expression.\r\n* Clone: CloneMethodMustBePublic (rulesets/java/clone.xml/CloneMethodMustBePublic)\r\nThe java manual says “By convention, classes that implement the Cloneable interface should override Object.clone (which is protected) with a public method.”\r\n* Clone: CloneMethodReturnTypeMustMatchClassName (rulesets/java/clone.xml/CloneMethodReturnTypeMustMatchClassName)\r\nIf a class implements Cloneable the return type of the method clone() must be the class name.\r\n* Design: SingletonClassReturningNewInstance (rulesets/java/design.xml/SingletonClassReturningNewInstance)\r\nVerifies that the method called getInstance returns a cached instance and not always a fresh, new instance.\r\n* Design: SingleMethodRule (rulesets/java/design.xml/SingleMethodSingletonRule)\r\nVerifies that there is only one method called getInstance. If there are more methods that return the singleton, then it can easily happen, that these are not the same instances - and thus no singleton.\r\n\r\nWe should make sure that the following rule is disabled, as we have different convention for `this` usage:\r\n* Unnecessary: UselessQualifiedThis (rulesets/java/unnecessary.xml/UselessQualifiedThis)\r\nFlags unnecessary qualified usages of this, when this alone would be unique. E.g. use just this instead of Foo.this.\r\n\r\nPay attention to rename that happened:\r\n* UseSingleton -> UseUtilityClass\r\n"},"comment":{"url":"https://api.github.com/repos/teamed/qulice/issues/comments/171283431","html_url":"https://github.com/teamed/qulice/issues/540#issuecomment-171283431","issue_url":"https://api.github.com/repos/teamed/qulice/issues/540","id":171283431,"user":{"login":"krzyk","id":105730,"avatar_url":"https://avatars.githubusercontent.com/u/105730?v=3","gravatar_id":"","url":"https://api.github.com/users/krzyk","html_url":"https://github.com/krzyk","followers_url":"https://api.github.com/users/krzyk/followers","following_url":"https://api.github.com/users/krzyk/following{/other_user}","gists_url":"https://api.github.com/users/krzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/krzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzyk/subscriptions","organizations_url":"https://api.github.com/users/krzyk/orgs","repos_url":"https://api.github.com/users/krzyk/repos","events_url":"https://api.github.com/users/krzyk/events{/privacy}","received_events_url":"https://api.github.com/users/krzyk/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T13:01:36Z","updated_at":"2016-01-13T13:01:36Z","body":"@davvd this is postponed"}}