Skip to content
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

Drop FileTransformer API #229

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.eclipse.aether.resolution.ArtifactDescriptorPolicy;
import org.eclipse.aether.resolution.ResolutionErrorPolicy;
import org.eclipse.aether.transfer.TransferListener;
import org.eclipse.aether.transform.FileTransformerManager;

/**
* A special repository system session to enable decorating or proxying another session. To do so, clients have to
Expand Down Expand Up @@ -211,10 +210,4 @@ public RepositoryCache getCache()
{
return getSession().getCache();
}

@Override
public FileTransformerManager getFileTransformerManager()
{
return getSession().getFileTransformerManager();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
* under the License.
*/

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.ArtifactType;
import org.eclipse.aether.artifact.ArtifactTypeRegistry;
import org.eclipse.aether.collection.DependencyGraphTransformer;
Expand All @@ -45,8 +43,6 @@
import org.eclipse.aether.resolution.ArtifactDescriptorPolicy;
import org.eclipse.aether.resolution.ResolutionErrorPolicy;
import org.eclipse.aether.transfer.TransferListener;
import org.eclipse.aether.transform.FileTransformer;
import org.eclipse.aether.transform.FileTransformerManager;

import static java.util.Objects.requireNonNull;

Expand Down Expand Up @@ -78,8 +74,6 @@ public final class DefaultRepositorySystemSession

private LocalRepositoryManager localRepositoryManager;

private FileTransformerManager fileTransformerManager;

private WorkspaceReader workspaceReader;

private RepositoryListener repositoryListener;
Expand Down Expand Up @@ -137,7 +131,6 @@ public DefaultRepositorySystemSession()
proxySelector = NullProxySelector.INSTANCE;
authenticationSelector = NullAuthenticationSelector.INSTANCE;
artifactTypeRegistry = NullArtifactTypeRegistry.INSTANCE;
fileTransformerManager = NullFileTransformerManager.INSTANCE;
data = new DefaultSessionData();
}

Expand Down Expand Up @@ -175,7 +168,6 @@ public DefaultRepositorySystemSession( RepositorySystemSession session )
setDependencySelector( session.getDependencySelector() );
setVersionFilter( session.getVersionFilter() );
setDependencyGraphTransformer( session.getDependencyGraphTransformer() );
setFileTransformerManager( session.getFileTransformerManager() );
setData( session.getData() );
setCache( session.getCache() );
}
Expand Down Expand Up @@ -336,23 +328,6 @@ public DefaultRepositorySystemSession setLocalRepositoryManager( LocalRepository
return this;
}

@Override
public FileTransformerManager getFileTransformerManager()
{
return fileTransformerManager;
}

public DefaultRepositorySystemSession setFileTransformerManager( FileTransformerManager fileTransformerManager )
{
verifyStateForMutation();
this.fileTransformerManager = fileTransformerManager;
if ( this.fileTransformerManager == null )
{
this.fileTransformerManager = NullFileTransformerManager.INSTANCE;
}
return this;
}

@Override
public WorkspaceReader getWorkspaceReader()
{
Expand Down Expand Up @@ -889,15 +864,4 @@ public ArtifactType get( String typeId )
}

}

static final class NullFileTransformerManager implements FileTransformerManager
{
public static final FileTransformerManager INSTANCE = new NullFileTransformerManager();

@Override
public Collection<FileTransformer> getTransformersForArtifact( Artifact artifact )
{
return Collections.emptyList();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.eclipse.aether.resolution.ArtifactDescriptorPolicy;
import org.eclipse.aether.resolution.ResolutionErrorPolicy;
import org.eclipse.aether.transfer.TransferListener;
import org.eclipse.aether.transform.FileTransformerManager;

/**
* Defines settings and components that control the repository system. Once initialized, the session object itself is
Expand Down Expand Up @@ -260,14 +259,4 @@ public interface RepositorySystemSession
* @return The repository cache or {@code null} if none.
*/
RepositoryCache getCache();

/**
* Get the file transformer manager
*
* @return the manager, never {@code null}
* @deprecated Without any direct replacement for now. This API is OOM-prone, and also lacks a lot of context about
* transforming.
*/
@Deprecated
FileTransformerManager getFileTransformerManager();
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading