Skip to content

Commit 25a49ee

Browse files
author
Vincent Potucek
committed
[POC-FIX-PMD] maven-pmd-plugin: reactivate PMD - UnusedPrivateMethod
1 parent 96efade commit 25a49ee

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

impl/maven-core/src/main/java/org/apache/maven/internal/transformation/impl/DefaultConsumerPomArtifactTransformer.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import org.eclipse.aether.artifact.DefaultArtifact;
4747
import org.eclipse.aether.deployment.DeployRequest;
4848
import org.eclipse.aether.installation.InstallRequest;
49-
import org.eclipse.sisu.PreDestroy;
5049

5150
/**
5251
* Consumer POM transformer.
@@ -117,17 +116,6 @@ private void deferDeleteFile(Path generatedFile) {
117116
toDelete.add(generatedFile.toAbsolutePath());
118117
}
119118

120-
@PreDestroy
121-
private void doDeleteFiles() {
122-
for (Path file : toDelete) {
123-
try {
124-
Files.delete(file);
125-
} catch (IOException e) {
126-
// ignore, we did our best...
127-
}
128-
}
129-
}
130-
131119
public InstallRequest remapInstallArtifacts(RepositorySystemSession session, InstallRequest request) {
132120
if (consumerPomPresent(request.getArtifacts())) {
133121
request.setArtifacts(replacePom(request.getArtifacts()));

impl/maven-xml/src/main/java/org/apache/maven/internal/xml/DefaultXmlService.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -392,34 +392,6 @@ private static String getChildCombinationMode(Map<String, String> attributes) {
392392
return !isEmpty(value) ? value : DEFAULT_CHILDREN_COMBINATION_MODE;
393393
}
394394

395-
@Nullable
396-
private static XmlNode findNodeById(@Nonnull List<XmlNode> nodes, @Nonnull String id) {
397-
return nodes.stream()
398-
.filter(n -> id.equals(n.attribute(ID_COMBINATION_MODE_ATTRIBUTE)))
399-
.findFirst()
400-
.orElse(null);
401-
}
402-
403-
@Nullable
404-
private static XmlNode findNodeByKeys(
405-
@Nonnull List<XmlNode> nodes, @Nonnull XmlNode target, @Nonnull String[] keys) {
406-
return nodes.stream()
407-
.filter(n -> matchesKeys(n, target, keys))
408-
.findFirst()
409-
.orElse(null);
410-
}
411-
412-
private static boolean matchesKeys(@Nonnull XmlNode node1, @Nonnull XmlNode node2, @Nonnull String[] keys) {
413-
for (String key : keys) {
414-
String value1 = node1.attribute(key);
415-
String value2 = node2.attribute(key);
416-
if (!Objects.equals(value1, value2)) {
417-
return false;
418-
}
419-
}
420-
return true;
421-
}
422-
423395
static class IndentingXMLStreamWriter extends StreamWriterDelegate {
424396

425397
int depth = 0;

0 commit comments

Comments
 (0)