Skip to content

Commit 1673c08

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

File tree

144 files changed

+233
-8
lines changed

Some content is hidden

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

144 files changed

+233
-8
lines changed

.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-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
}

impl/maven-core/src/main/java/org/apache/maven/configuration/internal/EnhancedConfigurationConverter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* interface.
3434
*/
3535
class EnhancedConfigurationConverter extends ObjectWithFieldsConverter {
36+
@Override
3637
protected Object fromExpression(
3738
final PlexusConfiguration configuration, final ExpressionEvaluator evaluator, final Class<?> type)
3839
throws ComponentConfigurationException {

impl/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static <T> Provider<T> seededKeyProvider(Class<? extends T> clazz) {
4646
return SessionScope.<T>seededKeySupplier(clazz)::get;
4747
}
4848

49+
@Override
4950
protected boolean isTypeAnnotation(Class<? extends Annotation> annotationType) {
5051
return "org.apache.maven.api.di.Typed".equals(annotationType.getName())
5152
|| "org.eclipse.sisu.Typed".equals(annotationType.getName())

impl/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class LifecycleExecutorSubModulesTest extends AbstractCoreMavenComponentTestCase
6060
@Inject
6161
private ExceptionHandler exceptionHandler;
6262

63+
@Override
6364
protected String getProjectsDirectory() {
6465
return "src/test/projects/lifecycle-executor";
6566
}

impl/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
6969
@Inject
7070
private MojoDescriptorCreator mojoDescriptorCreator;
7171

72+
@Override
7273
protected String getProjectsDirectory() {
7374
return "src/test/projects/lifecycle-executor";
7475
}

impl/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/CompletionServiceStub.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public CompletionServiceStub(boolean finishImmediately) {
4444
this.finishImmediately = finishImmediately;
4545
}
4646

47+
@Override
4748
public Future<ProjectSegment> submit(Callable<ProjectSegment> task) {
4849
FutureTask<ProjectSegment> projectBuildFutureTask = new FutureTask<>(task);
4950
projectBuildFutureTasks.add(projectBuildFutureTask);

0 commit comments

Comments
 (0)