Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for #13760 - running script compiled jar no longer restricted to java.base module #15103

Merged
merged 2 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/runner/ScalaClassLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ object ScalaClassLoader {
@sharable private[this] val bootClassLoader: ClassLoader =
if scala.util.Properties.isJavaAtLeast("9") then
try
MethodHandles.lookup().findStatic(classOf[ClassLoader], "getPlatformClassLoader", MethodType.methodType(classOf[ClassLoader])).invoke().asInstanceOf[ClassLoader]
ClassLoader.getSystemClassLoader.getParent
catch case _: Throwable => null
else null

Expand Down
2 changes: 1 addition & 1 deletion compiler/test-resources/scripting/sqlDateError.sc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!bin/scala -nosave
#!bin/scala

def main(args: Array[String]): Unit = {
println(new java.sql.Date(100L))
Expand Down