mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Fix StackOverflowError.
This commit is contained in:
parent
0b584c7626
commit
0a0b478ba3
2 changed files with 7 additions and 6 deletions
|
@ -60,12 +60,7 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors,
|
|||
/**
|
||||
* Create an IClasspathDependency from a Maven id.
|
||||
*/
|
||||
override fun createMaven(id: String, optional: Boolean) : IClasspathDependency=
|
||||
if (KobaltMavenResolver.isRangeVersion(id)) {
|
||||
Kobalt.INJECTOR.getInstance(DependencyManager::class.java).create(id, optional)
|
||||
} else {
|
||||
resolver.create(id, optional)
|
||||
}
|
||||
override fun createMaven(id: String, optional: Boolean) : IClasspathDependency = resolver.create(id, optional)
|
||||
|
||||
/**
|
||||
* Create an IClasspathDependency from a path.
|
||||
|
|
|
@ -34,6 +34,12 @@ class DependencyManagerTest @Inject constructor(val dependencyManager: Dependenc
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun createId() {
|
||||
// Caused a StackOverflowException in 0.923
|
||||
val id = dependencyManager.createMaven("com.beust.kobalt:kobalt-line-count:jar:(0,]")
|
||||
}
|
||||
|
||||
@Test(description = "Make sure that COMPILE scope dependencies get resolved properly")
|
||||
fun testScopeDependenciesShouldBeDownloaded() {
|
||||
val testDeps = listOf(dependencyManager.create("org.testng:testng:6.10"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue