Skip to content

Commit

Permalink
Never try and create an empty hash set.
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Aug 18, 2014
1 parent 050bb97 commit 41fbd1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private[sql] class OpenHashSetSerializer extends Serializer[OpenHashSet[_]] {
val rowSerializer = kryo.getSerializer(classOf[Any]).asInstanceOf[Serializer[Any]]

val numItems = input.readInt()
val set = new OpenHashSet[Any](numItems)
val set = new OpenHashSet[Any](numItems + 1)
var i = 0
while (i < numItems) {
val row = rowSerializer.read(kryo, input, classOf[Any].asInstanceOf[Class[Any]])
Expand Down

0 comments on commit 41fbd1d

Please sign in to comment.