Skip to content

Commit

Permalink
[FLINK-11920][scala] Reuse java classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Apr 11, 2019
1 parent 60507b8 commit bbaeb7e
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,8 @@ object EnumValueSerializerUpgradeTest {

val settings = new GenericRunnerSettings(out.println _)

val classLoader = Thread.currentThread().getContextClassLoader

val urls = classLoader match {
case urlClassLoader: URLClassLoader =>
urlClassLoader.getURLs
case x => throw new IllegalStateException(s"Not possible to extract URLs " +
s"from class loader $x.")
}

settings.classpath.value = urls.map(_.toString).mkString(java.io.File.pathSeparator)
// use the java classpath so that scala libraries are available to the compiler
settings.usejavacp.value = true
settings.outdir.value = file.getParent

val reporter = new ConsoleReporter(settings)
Expand Down

0 comments on commit bbaeb7e

Please sign in to comment.