File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
core/src/main/scala/org/apache/spark/api/r Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments