[
https://jira.codehaus.org/browse/MPMD-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335590#comment-335590
]
Zahi Karam commented on MPMD-173:
---------------------------------
Actually, this is the second I try to post it but I can't find the SonarQube
project. Could you please advise?
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira