-
Notifications
You must be signed in to change notification settings - Fork 207
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
Refactor language level migration #459
Refactor language level migration #459
Conversation
we should prefer a switch statement for longer conditional branches (3+) as it reads better
c342193
to
f6bb473
Compare
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, few minor comments
reader.endObject(); | ||
} else { | ||
reader.skipValue(); | ||
switch (name) { |
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.
Could just do switch (reader.nextName()) {
as the name
variable is only used once
handled = reader.nextInt(); | ||
} else { | ||
reader.skipValue(); | ||
switch (name) { |
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.
Same as above
reader.beginObject(); | ||
while (reader.hasNext()) { | ||
String eventName = reader.nextName(); | ||
switch (eventName) { |
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.
Same as above
This PR makes 3 changes as reported via Android Studio inspection: