You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "sakis kaliakoudas (JIRA)" <ji...@apache.org> on 2015/08/20 02:02:46 UTC
[jira] [Created] (MPMD-215) FieldDeclarationsShouldBeAtStartOfClass
false positive
sakis kaliakoudas created MPMD-215:
--------------------------------------
Summary: 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
Fix For: 3.6
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)