Skip to content

Commit 5a80844

Browse files
author
cafreeman
committed
Fix style nits
1 parent 7c6bd0c commit 5a80844

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

core/src/main/scala/org/apache/spark/api/r/RBackendHandler.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,18 @@ private[r] class RBackendHandler(server: RBackend)
8888
ctx.close()
8989
}
9090

91-
//get classPath for static object. This addresses SPARK-5185
91+
// Looks up a class given a class name. This function first checks the
92+
// current class loader and if a class is not found, it looks up the class
93+
// in the context class loader. Address [SPARK-5185]
9294
def getStaticClass(objId: String): Class[_] = {
9395
try {
9496
val clsCurrent = Class.forName(objId)
9597
clsCurrent
96-
} catch {
97-
//use contextLoader if we can't find the JAR in the system class loader
98-
case e: ClassNotFoundException =>
99-
val clsContext = Class.forName(objId, true, Thread.currentThread().getContextClassLoader)
100-
clsContext
98+
} catch {
99+
// Use contextLoader if we can't find the JAR in the system class loader
100+
case e: ClassNotFoundException =>
101+
val clsContext = Class.forName(objId, true, Thread.currentThread().getContextClassLoader)
102+
clsContext
101103
}
102104
}
103105

0 commit comments

Comments
 (0)