[ 
https://jira.codehaus.org/browse/MPMD-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Lundberg closed MPMD-173.
--------------------------------

    Resolution: Not A Bug

> The issue "Class cannot be instantiated and does not provide any static 
> methods or fields" should be avoided when a public static class is defined
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MPMD-173
>                 URL: https://jira.codehaus.org/browse/MPMD-173
>             Project: Maven PMD Plugin
>          Issue Type: Improvement
>            Reporter: Zahi Karam
>
> In our code, in a same file, we use a builder as follows:
> {code:java}
> public final class Test {
> private Test() {}
> public static final class Builder {
> public Test build()
> { return new Test(); }
> }
> }
> Test test = new Test.Builder().build();
> {code}
> However, SonarQube raises the issue "Class cannot be instantiated and does 
> not provide any static methods or fields" on such class.
> Could you please advise or fix the problem if it is a real issue?
> Thanks



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to