Skip to content

Reject non-standard Number classes during POJO serialization (RTDB)#262

Merged
schmidt-sebastian merged 2 commits intomasterfrom
mrschmidt-errormsg
Mar 18, 2019
Merged

Reject non-standard Number classes during POJO serialization (RTDB)#262
schmidt-sebastian merged 2 commits intomasterfrom
mrschmidt-errormsg

Conversation

@schmidt-sebastian
Copy link
Contributor

This ports the changes from firebase/firebase-android-sdk#272 and updates the error messages in the RTDB client when a user attempts to serialize Number types that we cannot serialize to JSON.

Addresses: #75

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

LGTM with a nit.

if (!existingPropertyName.equals(propertyName)) {
throw new DatabaseException(
"Found setter with invalid case-sensitive name: " + method.getName());
"Found setter with invalid " + "case-sensitive name: " + method.getName());
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this instance and the remaining string concatenations in this file that follow a similar pattern.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks 👍

@schmidt-sebastian schmidt-sebastian merged commit ca75a0f into master Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants