Skip to content

Commit

Permalink
improve javaBootClassPath lazy evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
jtjeferreira committed Dec 10, 2024
1 parent 705c33c commit 31690d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/config/PathResolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ object PathResolver {
def classPathEnv: String = envOrElse("CLASSPATH", "")
def sourcePathEnv: String = envOrElse("SOURCEPATH", "")

def javaBootClassPath: String = propOrElse("sun.boot.class.path", searchForBootClasspath)
//using propOrNone/getOrElse instead of propOrElse so that searchForBootClasspath is lazy evaluated
def javaBootClassPath: String = propOrNone("sun.boot.class.path") getOrElse searchForBootClasspath

def javaExtDirs: String = propOrEmpty("java.ext.dirs")
def scalaHome: String = propOrEmpty("scala.home")
Expand Down

0 comments on commit 31690d4

Please sign in to comment.