You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2015/12/07 14:17:11 UTC

[jira] [Commented] (MPMD-215) FieldDeclarationsShouldBeAtStartOfClass false positive

    [ https://issues.apache.org/jira/browse/MPMD-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15044901#comment-15044901 ] 

Hudson commented on MPMD-215:
-----------------------------

SUCCESS: Integrated in maven-plugins #4860 (See [https://builds.apache.org/job/maven-plugins/4860/])
[MPMD-215] FieldDeclarationsShouldBeAtStartOfClass false positive
[MPMD-217] False positive UselessParentheses
[MPMD-218] Update to PMD 5.3.5 (dennisl: [http://svn.apache.org/viewvc/?view=rev&rev=1718337])
* maven-pmd-plugin/pom.xml


> FieldDeclarationsShouldBeAtStartOfClass false positive
> ------------------------------------------------------
>
>                 Key: MPMD-215
>                 URL: https://issues.apache.org/jira/browse/MPMD-215
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 3.5
>         Environment: Windows 10 64bit
>            Reporter: sakis kaliakoudas
>            Assignee: Dennis Lundberg
>             Fix For: 3.6
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> I get the FieldDeclarationsShouldBeAtStartOfClass error:
> "Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes." for line 32
> Adding my first 32 lines of the project, excluding imports:
> @RunWith(RobolectricTestRunner.class)
> @PowerMockIgnore({"org.mockito.*", "org.robolectric.*", "android.*", "org.slf4j.*"})
> @PrepareForTest(ActivityRecognitionResult.class)
> public class MobilityStatusFetcherIntentServiceTest {
>     @SuppressWarnings("checkstyle:visibilitymodifier")
>     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD",
>             justification = "Bootstrap PowerMock using a JUnit Rule instead of using the PowerMockRunner and the RunWith annotation.")
>     @Rule public PowerMockRule powerMockRule = new PowerMockRule();
> The line that starts with @Rule is line 32.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)