-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case class Empty is valid for Avro as well #87
Conversation
Codecov Report
@@ Coverage Diff @@
## master #87 +/- ##
=======================================
Coverage 88.52% 88.52%
=======================================
Files 12 12
Lines 122 122
=======================================
Hits 108 108
Misses 14 14 Continue to review full report at Codecov.
|
@@ -40,7 +40,7 @@ package object protocol { | |||
class option(val name: String, val value: String, val quote: Boolean) extends StaticAnnotation | |||
|
|||
@message | |||
case class Empty() | |||
case class Empty(s: String = "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if @message object Empty { val s: String = "" }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll be the same case as here, right? But IMHO it deserves a try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @eperinan !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
It solves #86 and resolves #79
Finally I added the param
s: String = ""
to the existing case class and I created several test for it