aboutsummaryrefslogtreecommitdiffstats
path: root/container-di
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-07-19 13:40:35 +0200
committerBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-07-20 13:15:21 +0200
commit43298ad59815c9731e0d2f0cd8604af08a119021 (patch)
treed8b3a52ec2d618e66f107181a5c791ba63ec5b07 /container-di
parent94e3449f4b57647b199a03e2e59f91ee902b35eb (diff)
Rewrite ProjectBundleClassPaths to Java
Diffstat (limited to 'container-di')
-rw-r--r--container-di/src/main/scala/com/yahoo/container/di/osgi/OsgiUtil.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/container-di/src/main/scala/com/yahoo/container/di/osgi/OsgiUtil.scala b/container-di/src/main/scala/com/yahoo/container/di/osgi/OsgiUtil.scala
index f2120786579..d119f7b0cd4 100644
--- a/container-di/src/main/scala/com/yahoo/container/di/osgi/OsgiUtil.scala
+++ b/container-di/src/main/scala/com/yahoo/container/di/osgi/OsgiUtil.scala
@@ -10,10 +10,10 @@ import java.util.stream.Collectors
import com.google.common.io.Files.fileTreeTraverser
import com.yahoo.component.ComponentSpecification
import com.yahoo.container.di.Osgi.RelativePath
+import com.yahoo.osgi.maven.ProjectBundleClassPaths
+import com.yahoo.osgi.maven.ProjectBundleClassPaths.BundleClasspathMapping
import com.yahoo.vespa.scalalib.arm.Using.using
import com.yahoo.vespa.scalalib.java.function.FunctionConverters._
-import com.yahoo.vespa.scalalib.osgi.maven.ProjectBundleClassPaths
-import com.yahoo.vespa.scalalib.osgi.maven.ProjectBundleClassPaths.BundleClasspathMapping
import org.osgi.framework.Bundle
import org.osgi.framework.wiring.BundleWiring
@@ -46,7 +46,7 @@ object OsgiUtil {
bundleSpec: ComponentSpecification,
packagesToScan: Set[String]) = {
classEntriesFrom(
- bundleClassPathMapping(bundleSpec, classLoader).classPathElements,
+ bundleClassPathMapping(bundleSpec, classLoader).classPathElements.asScala.toList,
packagesToScan)
}
@@ -59,7 +59,7 @@ object OsgiUtil {
projectBundleClassPaths.mainBundle
} else {
log.log(Level.WARNING, s"Dependencies of the bundle $bundleSpec will not be scanned. Please file a feature request if you need this" )
- matchingBundleClassPathMapping(bundleSpec, projectBundleClassPaths.providedDependencies)
+ matchingBundleClassPathMapping(bundleSpec, projectBundleClassPaths.providedDependencies.asScala.toList)
}
}
@@ -71,9 +71,9 @@ object OsgiUtil {
}
private def loadProjectBundleClassPaths(classLoader: ClassLoader): ProjectBundleClassPaths = {
- val classPathMappingsFileLocation = classLoader.getResource(ProjectBundleClassPaths.classPathMappingsFileName)
+ val classPathMappingsFileLocation = classLoader.getResource(ProjectBundleClassPaths.CLASSPATH_MAPPINGS_FILENAME)
if (classPathMappingsFileLocation == null)
- throw new RuntimeException(s"Couldn't find ${ProjectBundleClassPaths.classPathMappingsFileName} in the class path.")
+ throw new RuntimeException(s"Couldn't find ${ProjectBundleClassPaths.CLASSPATH_MAPPINGS_FILENAME} in the class path.")
ProjectBundleClassPaths.load(Paths.get(classPathMappingsFileLocation.toURI))
}