Skip to content

Commit

Permalink
[MRESOLVER-337] Rename RepositoryFilteredException to ArtifactFiltere…
Browse files Browse the repository at this point in the history
…dOutException
  • Loading branch information
slawekjaranowski committed Mar 2, 2023
1 parent 91825e7 commit dfb22c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import org.eclipse.aether.RepositoryException;
import org.eclipse.aether.repository.LocalArtifactResult;
import org.eclipse.aether.transfer.ArtifactFilteredOutException;
import org.eclipse.aether.transfer.ArtifactNotFoundException;
import org.eclipse.aether.transfer.RepositoryFilteredException;
import org.eclipse.aether.transfer.RepositoryOfflineException;

/**
Expand Down Expand Up @@ -128,7 +128,7 @@ private static Throwable getCause(List<? extends ArtifactResult> results) {
Throwable notFound = null, offline = null;
for (Throwable t : result.getExceptions()) {
if (t instanceof ArtifactNotFoundException) {
if (notFound == null || notFound instanceof RepositoryFilteredException) {
if (notFound == null || notFound instanceof ArtifactFilteredOutException) {
notFound = t;
}
if (offline == null && t.getCause() instanceof RepositoryOfflineException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @since 1.9.6
*/
public class RepositoryFilteredException extends ArtifactNotFoundException {
public class ArtifactFilteredOutException extends ArtifactNotFoundException {

/**
* Creates a new exception with the specified artifact, repository and detail message.
Expand All @@ -35,7 +35,7 @@ public class RepositoryFilteredException extends ArtifactNotFoundException {
* @param repository The involved remote repository, may be {@code null}.
* @param message The detail message, may be {@code null}.
*/
public RepositoryFilteredException(Artifact artifact, RemoteRepository repository, String message) {
public ArtifactFilteredOutException(Artifact artifact, RemoteRepository repository, String message) {
super(artifact, repository, message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
import org.eclipse.aether.spi.locator.ServiceLocator;
import org.eclipse.aether.spi.resolution.ArtifactResolverPostProcessor;
import org.eclipse.aether.spi.synccontext.SyncContextFactory;
import org.eclipse.aether.transfer.ArtifactFilteredOutException;
import org.eclipse.aether.transfer.ArtifactNotFoundException;
import org.eclipse.aether.transfer.ArtifactTransferException;
import org.eclipse.aether.transfer.NoRepositoryConnectorException;
import org.eclipse.aether.transfer.RepositoryFilteredException;
import org.eclipse.aether.transfer.RepositoryOfflineException;
import org.eclipse.aether.util.ConfigUtils;
import org.slf4j.Logger;
Expand Down Expand Up @@ -309,7 +309,7 @@ private List<ArtifactResult> resolve(
RemoteRepositoryFilter.Result filterResult = filter.acceptArtifact(repository, artifact);
if (!filterResult.isAccepted()) {
result.addException(
new RepositoryFilteredException(artifact, repository, filterResult.reasoning()));
new ArtifactFilteredOutException(artifact, repository, filterResult.reasoning()));
filteredRemoteRepositories.remove(repository);
}
}
Expand Down

0 comments on commit dfb22c3

Please sign in to comment.