Skip to content

IMain interpret does not reset context classloader #8521

@scabug

Description

@scabug

Calling interpret sets the current thread's context classloader, but fails to reset it to its previous state when returning from that method.

The following workaround illustrates the problem:

    val th = Thread.currentThread()
    val cl = th.getContextClassLoader
    try {
      imain.interpret(text)
    } finally {
      th.setContextClassLoader(cl)
    }

Jason Zaugg suggests that the following might be the regression: scala/scala@3a30af1#diff-36a995091016ecd5cdb97e267764e05aL538

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions