Skip to content

Fix for JsonNumber output in cache dump #68

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private fun Any?.toExternal(): Any? {
is Int -> this
is Long -> this
is Double -> this
is JsonNumber -> this
is JsonNumber -> this.value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toExternal() may be used in other places. Can you implement JsonNumber.toString() instead? (here)

I wouldn't worry too much about unit tests here. You could do something like

assertEquals("12345", JsonNumber("12345").toString())

But the logic is simple enough, I don't think it requires a test.

is CacheKey -> this.serialize()
is List<*> -> {
map { it.toExternal() }
Expand Down