diff --git a/downloader/src/main/kotlin/vcs/GitWorkingTree.kt b/downloader/src/main/kotlin/vcs/GitWorkingTree.kt index cc62dfe569b15..33494b522b965 100644 --- a/downloader/src/main/kotlin/vcs/GitWorkingTree.kt +++ b/downloader/src/main/kotlin/vcs/GitWorkingTree.kt @@ -50,7 +50,7 @@ private fun findGitOrSubmoduleDir(workingDirOrFile: File): Repository { }.getOrThrow() } -open class GitWorkingTree( +internal open class GitWorkingTree( workingDir: File, vcsType: VcsType, private val repositoryUrlPrefixReplacements: Map = emptyMap() diff --git a/downloader/src/main/kotlin/vcs/Mercurial.kt b/downloader/src/main/kotlin/vcs/Mercurial.kt index e9ea098fadbdd..445e0a39c608b 100644 --- a/downloader/src/main/kotlin/vcs/Mercurial.kt +++ b/downloader/src/main/kotlin/vcs/Mercurial.kt @@ -55,7 +55,7 @@ class Mercurial : VersionControlSystem(MercurialCommand) { override fun getDefaultBranchName(url: String) = "default" - override fun getWorkingTree(vcsDirectory: File) = MercurialWorkingTree(vcsDirectory, type) + override fun getWorkingTree(vcsDirectory: File): WorkingTree = MercurialWorkingTree(vcsDirectory, type) override fun isApplicableUrlInternal(vcsUrl: String) = ProcessCapture("hg", "identify", vcsUrl).isSuccess diff --git a/downloader/src/main/kotlin/vcs/MercurialWorkingTree.kt b/downloader/src/main/kotlin/vcs/MercurialWorkingTree.kt index 25dbb7b1012e4..b455d18e13cce 100644 --- a/downloader/src/main/kotlin/vcs/MercurialWorkingTree.kt +++ b/downloader/src/main/kotlin/vcs/MercurialWorkingTree.kt @@ -25,7 +25,7 @@ import org.ossreviewtoolkit.downloader.WorkingTree import org.ossreviewtoolkit.model.VcsType import org.ossreviewtoolkit.utils.common.ProcessCapture -class MercurialWorkingTree(workingDir: File, vcsType: VcsType) : WorkingTree(workingDir, vcsType) { +internal class MercurialWorkingTree(workingDir: File, vcsType: VcsType) : WorkingTree(workingDir, vcsType) { override fun isValid(): Boolean { if (!workingDir.isDirectory) return false diff --git a/downloader/src/main/kotlin/vcs/Subversion.kt b/downloader/src/main/kotlin/vcs/Subversion.kt index 4e91820d14c08..ddc70acd31464 100644 --- a/downloader/src/main/kotlin/vcs/Subversion.kt +++ b/downloader/src/main/kotlin/vcs/Subversion.kt @@ -66,7 +66,8 @@ class Subversion : VersionControlSystem() { override fun getDefaultBranchName(url: String) = "trunk" - override fun getWorkingTree(vcsDirectory: File) = SubversionWorkingTree(vcsDirectory, type, clientManager) + override fun getWorkingTree(vcsDirectory: File): WorkingTree = + SubversionWorkingTree(vcsDirectory, type, clientManager) override fun isApplicableUrlInternal(vcsUrl: String) = try { diff --git a/downloader/src/main/kotlin/vcs/SubversionWorkingTree.kt b/downloader/src/main/kotlin/vcs/SubversionWorkingTree.kt index 0ceea2908c0a1..a83fc12bf3d91 100644 --- a/downloader/src/main/kotlin/vcs/SubversionWorkingTree.kt +++ b/downloader/src/main/kotlin/vcs/SubversionWorkingTree.kt @@ -32,7 +32,7 @@ import org.tmatesoft.svn.core.SVNURL import org.tmatesoft.svn.core.wc.SVNClientManager import org.tmatesoft.svn.core.wc.SVNRevision -class SubversionWorkingTree( +internal class SubversionWorkingTree( workingDir: File, vcsType: VcsType, private val clientManager: SVNClientManager