class DefaultTransportProvider implements TransportProvider {
    private final org.eclipse.aether.spi.connector.transport.TransporterProvider transporterProvider;

    @Inject
    public DefaultTransportProvider(TransporterProvider transporterProvider) {
        this.transporterProvider = requireNonNull(transporterProvider);
    }

    @Override
    public Transport transport(Session session, RemoteRepository repository) {<FILL_FUNCTION_BODY>}
}

        try {
            URI baseURI = new URI(repository.getUrl());
            return new DefaultTransport(
                    baseURI,
                    transporterProvider.newTransporter(
                            InternalSession.from(session).getSession(),
                            ((DefaultRemoteRepository) repository).getRepository()));
        } catch (URISyntaxException e) {
            throw new TransportProviderException("Remote repository URL invalid", e);
        } catch (NoTransporterException e) {
            throw new TransportProviderException("Unsupported remote repository", e);
        }
    
<no_super_class>