Skip to content

Instantly share code, notes, and snippets.

@rgorsuch
Forked from jessitron/gist:8376139
Created July 31, 2015 13:03
Show Gist options
  • Save rgorsuch/b404c658551a6a8aeb35 to your computer and use it in GitHub Desktop.
Save rgorsuch/b404c658551a6a8aeb35 to your computer and use it in GitHub Desktop.

Revisions

  1. rgorsuch revised this gist Jul 31, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,4 @@
    }

    val urls = urlses(getClass.getClassLoader)
    println(urls.filterNot(_.toString.contains("ivy")).mkString("\n")
    println(urls.filterNot(_.toString.contains("ivy")).mkString("\n"))
  2. @jessitron jessitron created this gist Jan 11, 2014.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    def urlses(cl: ClassLoader): Array[java.net.URL] = cl match {
    case null => Array()
    case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent)
    case _ => urlses(cl.getParent)
    }

    val urls = urlses(getClass.getClassLoader)
    println(urls.filterNot(_.toString.contains("ivy")).mkString("\n")