File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
gremlin-scala/src/test/scala/gremlin/scala/marshallable
macros/src/main/scala/gremlin/scala Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,11 @@ class MarshallableSpec extends WordSpec with Matchers {
351351 results shouldBe Set (cc1, cc2)
352352 }
353353
354+ case class EmptyCC ()
355+ " handle case class without elements" in new Fixture {
356+ val m = implicitly[Marshallable [EmptyCC ]]
357+ }
358+
354359 trait Fixture {
355360 val graph = TinkerGraph .open.asScala
356361 }
Original file line number Diff line number Diff line change @@ -196,7 +196,10 @@ object Marshallable {
196196 $label,
197197 _root_.scala.collection.immutable.List(.. $fromCCParams)
198198 .flatten
199- .filter(kv => _root_.scala.Option(kv._2).isDefined)
199+ .filter { kv =>
200+ kv.isInstanceOf[Product2[_, _]] &&
201+ kv.asInstanceOf[Product2[_, _]]._2 != null
202+ }
200203 )
201204 def toCC(element: _root_.gremlin.scala.Element): $tpe = $companion(.. $toCCParams)
202205 }
You can’t perform that action at this time.
0 commit comments