Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-8843

Scala Interpreter classloader - getResources() returns empty collection.

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.11.2
    • Fix Version/s: Scala 2.11.3
    • Component/s: Repl / Interpreter
    • Labels:
      None

      Description

      Interpreter's classloader returns empty enumeration when requested using getResources (same code executed as application returns single entry)

        import collection.JavaConverters._
        class MyClass
        val cl = classOf[MyClass].getClassLoader
        val resName = classOf[MyClass].getName.replace(".","/")+".class"
       
        println(s"getResource: ${cl.getResource(resName)}")
        println(s"getResourceAsStream: ${cl.getResourceAsStream(resName)}")
        println(s"getResources: ${cl.getResources(resName).asScala.mkString}")
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                apm A. P. Marki
                Reporter:
                zorba128 Marcin Kielar
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: