There was an error while loading. Please reload this page.
1 parent b96b48f commit c2cffc5Copy full SHA for c2cffc5
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/codec/SendLongDataEncoder.scala
@@ -44,16 +44,12 @@ class SendLongDataEncoder(charset: Charset)
44
}
45
46
private def encodeValue(maybeValue: Any) : ByteBuf = {
47
- if ( maybeValue == null || maybeValue == None ) {
48
- throw new UnsupportedOperationException("Cannot encode NULL as long value")
49
- } else {
50
- val value = maybeValue match {
51
- case Some(v) => v
52
- case _ => maybeValue
53
- }
54
- val encoder = rowEncoder.encoderFor(value)
55
- encoder.encodeLong(value)
+ val value = maybeValue match {
+ case Some(v) => v
+ case _ => maybeValue
56
+ val encoder = rowEncoder.encoderFor(value)
+ encoder.encodeLong(value)
57
58
59
0 commit comments