mirror of https://github.com/sbt/sbt.git
Fix DefinesClass implementation for jdk > 8
When trying to use any jdk > 8 with the latest sbt, sbt will die in some projects because it tries to call Locate.defineClass on rt.jar, which is represented with a DummyVirtualFile and causes a crash.
This commit is contained in:
parent
924d8e75cf
commit
7d07bbabbf
|
|
@ -179,7 +179,8 @@ object Defaults extends BuildCommon {
|
||||||
classpathEntryDefinesClass := {
|
classpathEntryDefinesClass := {
|
||||||
val converter = fileConverter.value
|
val converter = fileConverter.value
|
||||||
val f = FileValueCache({ x: NioPath =>
|
val f = FileValueCache({ x: NioPath =>
|
||||||
Locate.definesClass(converter.toVirtualFile(x))
|
if (x.getFileName.toString != "rt.jar") Locate.definesClass(converter.toVirtualFile(x))
|
||||||
|
else ((_: String) => false): DefinesClass
|
||||||
}).get;
|
}).get;
|
||||||
{ (x: File) =>
|
{ (x: File) =>
|
||||||
f(x.toPath)
|
f(x.toPath)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue