10000 Remove unused private methods by Pankraz76 · Pull Request #2310 · apache/maven · GitHub
[go: up one dir, main page]

Skip to content

Remove unused private methods #2310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10000
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.repository.legacy.repository.ArtifactRepositoryFactory;
import org.apache.maven.wagon.ResourceDoesNotExistException;
Expand Down Expand Up @@ -176,27 +175,6 @@ private ArtifactRepository createStringRepo() {
"id", "string://url", new ArtifactRepositoryLayoutStub(), null, null);
}

/**
* Build an ArtifactRepository object.
*
* @param id
* @param url
* @return
*/
private ArtifactRepository getRepo(String id, String url) {
return artifactRepositoryFactory.createArtifactRepository(id, url, new DefaultRepositoryLayout(), null, null);
}

/**
* Build an ArtifactRepository object.
*
* @param id
* @return
*/
private ArtifactRepository getRepo(String id) {
return getRepo(id, "http://something");
}

@Test
void testDefaultWagonManager() throws Exception {
assertWagon("a");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1587,13 +1587,6 @@ private void enableOnPresentOption(
enableOnPresentOption(commandLine, String.valueOf(option), setting);
}

private void enableOnAbsentOption(
final CommandLine commandLine, final char option, final Consumer<Boolean> setting) {
if (!commandLine.hasOption(option)) {
setting.accept(true);
}
}

int calculateDegreeOfConcurrency(String threadConfiguration) {
try {
if (threadConfiguration.endsWith("C")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

import org.apache.maven.api.Packaging;
import org.apache.maven.api.di.Inject;
Expand Down Expand Up @@ -108,18 +106,6 @@ private void addPlugin(Map<Plugin, Plugin> plugins, Plugin plugin) {
}
}

private static String getExecutionId(Plugin plugin, String goal) {
Set<String> existingIds = plugin != null
? plugin.getExecutions().stream().map(PluginExecution::getId).collect(Collectors.toSet())
: Set.of();
String base = "default-" + goal;
String id = base;
for (int index = 1; existingIds.contains(id); index++) {
id = base + '-' + index;
}
return id;
}

/**
* The domain-specific model merger for lifecycle bindings
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,4 @@ private static <T> boolean addToStringField(StringBuilder sb, T o, Function<T, B
}
return w;
}

private static boolean isEmpty(String str) {
return str == null || str.isEmpty();
}
}
0