Skip to content

Commit 493346d

Browse files
author
Vincent Potucek
committed
[S1161] rule: category/java/bestpractices.xml/MissingOverride
1 parent 275bf82 commit 493346d

149 files changed

Lines changed: 238 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
.factorypath
1717
.vscode/
1818
repo/
19-
/*.svg
19+
/*.svg
20+
.pmd/.cache

.pmd/ruleset.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
<ruleset name="DOD"
21+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
24+
<exclude-pattern>.*/compat/maven-compat/.*</exclude-pattern>
25+
<rule ref="category/java/bestpractices.xml/MissingOverride" />
26+
</ruleset>

compat/maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class ArtifactDeployerTest extends AbstractArtifactComponentTestCase {
4646
@Inject
4747
private SessionScope sessionScope;
4848

49+
@Override
4950
protected String component() {
5051
return "deployer";
5152
}

compat/maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class ArtifactInstallerTest extends AbstractArtifactComponentTestCase {
4141
@Inject
4242
private SessionScope sessionScope;
4343

44+
@Override
4445
protected String component() {
4546
return "installer";
4647
}

compat/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestFileWagon.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class TestFileWagon extends FileWagon {
3535
private TestTransferListener testTransferListener;
3636
private boolean insideGet;
3737

38+
@Override
3839
@Deprecated
3940
protected void getTransfer(Resource resource, File destination, InputStream input, boolean closeInput, int maxSize)
4041
throws TransferFailedException {

compat/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ public String getFileContents(File file, String encoding) throws IOException {
152152
return FileUtils.fileRead(file, encoding);
153153
}
154154

155+
@Override
155156
protected void finalize() throws Throwable {
156157
maybeWarnAboutCleanUp();
157158

compat/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ protected File projectFile(String groupId, String artifactId) {
4848
// The local repository for this category of tests
4949
// ----------------------------------------------------------------------
5050

51+
@Override
5152
protected File getLocalRepositoryPath() {
5253
return getTestFile("target/test-classes/inheritance-repo/" + getTestSeries());
5354
}

compat/maven-embedder/src/main/java/org/apache/maven/cli/ExtensionConfigurationModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static class ExtensionInterpolator extends MavenTransformer {
6868
super(transformer);
6969
}
7070

71+
@Override
7172
public XmlNode transform(XmlNode node) {
7273
return super.transform(node);
7374
}

compat/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public final class PlexusXmlBeanConverter implements PlexusBeanConverter {
8080
// Public methods
8181
// ----------------------------------------------------------------------
8282

83+
@Override
8384
@SuppressWarnings({"unchecked", "rawtypes"})
8485
public Object convert(final TypeLiteral role, final String value) {
8586
if (value.trim().startsWith("<")) {

impl/maven-cli/src/main/java/org/apache/maven/cling/extensions/ExtensionConfigurationModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static class ExtensionInterpolator extends MavenTransformer {
6868
super(transformer);
6969
}
7070

71+
@Override
7172
public XmlNode transform(XmlNode node) {
7273
return super.transform(node);
7374
}

0 commit comments

Comments
 (0)