Skip to content

Commit

Permalink
[TOREE-552] Downgrade Guava 14.0.1 to align with Spark (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
pan3793 authored Oct 1, 2023
1 parent 937c126 commit f6c2c6d
Show file tree
Hide file tree
Showing 3 changed files with 733 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

package org.apache.toree.magic.builtin

import com.google.common.reflect.ClassPath
import com.google.common.reflect.ClassPath.ClassInfo
import org.apache.toree.magic.InternalClassLoader
import com.google.common.base.Strings._
import org.apache.toree.utils.ClassPath
import org.apache.toree.utils.ClassPath.ClassInfo

import scala.collection.JavaConverters._

/**
Expand All @@ -38,15 +39,13 @@ class BuiltinLoader
* @return list of ClassInfo objects
*/
def getClasses(pkg: String = pkgName): List[ClassInfo] = {
isNullOrEmpty(pkg) match {
case true =>
List()
case false =>
// TODO: Decide if this.getClass.getClassLoader should just be this
val classPath = ClassPath.from(this.getClass.getClassLoader)
classPath.getTopLevelClasses(pkg).asScala.filter(
_.getSimpleName != this.getClass.getSimpleName
).toList
if (isNullOrEmpty(pkg)) {
List.empty
} else {
// TODO: Decide if this.getClass.getClassLoader should just be this
val classPath = ClassPath.from(this.getClass.getClassLoader)
classPath.getTopLevelClasses(pkg).asScala
.filter(_.getSimpleName != this.getClass.getSimpleName).toList
}
}

Expand Down
Loading

0 comments on commit f6c2c6d

Please sign in to comment.