-
Notifications
You must be signed in to change notification settings - Fork 426
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
AC-634 Migrated POJO classes to Kotlin #675
Conversation
Codecov Report
@@ Coverage Diff @@
## master #675 +/- ##
==========================================
- Coverage 12.36% 11.99% -0.37%
==========================================
Files 236 233 -3
Lines 10857 10414 -443
Branches 1002 1002
==========================================
- Hits 1342 1249 -93
+ Misses 9434 9084 -350
Partials 81 81
Continue to review full report at Codecov.
|
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.
@rishabh-997 These are my current reviews... haven't checked everything yet, since there's 81 files being changed. Also, make sure to apply my comments to other files if there's a similar pattern.
openmrs-client/src/main/java/org/openmrs/mobile/models/Resource.kt
Outdated
Show resolved
Hide resolved
openmrs-client/src/main/java/org/openmrs/mobile/models/Visit.kt
Outdated
Show resolved
Hide resolved
openmrs-client/src/main/java/org/openmrs/mobile/models/VisitType.kt
Outdated
Show resolved
Hide resolved
openmrs-client/src/test/java/org/openmrs/mobile/test/ACUnitTestBase.java
Outdated
Show resolved
Hide resolved
|
||
class SystemSetting : Resource() { | ||
|
||
@Expose |
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.
Do we need to serialize every variable in model classes anymore?
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.
I think its important because of following line in the code
Line 86 in d786247
.excludeFieldsWithoutExposeAnnotation() |
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 are your suggestions to this @f4ww4z sir ?
@rishabh-997 how is your progress for this? |
Actually I was trying to resolve the above conversations but faced many null pointer exceptions and then got engaged in admission_Form PR. I will continue this from next week after my university exams... |
6f296eb
to
bf27b3d
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.
@rishabh-997 please address these comments
- Remove redundant custom getters and setters. Only use custom getters for computed properties. See this doc.
- Remove star imports.
Just tested this and the app runs fine.
import com.google.gson.annotations.SerializedName | ||
import org.openmrs.mobile.utilities.DateUtils | ||
import java.io.Serializable | ||
import java.util.* |
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.
Please avoid star imports.
|
||
override var uuid: String? | ||
get() = uuid | ||
set(uuid) { |
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.
These getters and setters are redundant. Remove them.
9678d41
to
97f863d
Compare
97f863d
to
f1daacf
Compare
Updated User.kt Using lateinit to avoid initialization removed unused imports removed redundant getters squashing commits
f1daacf
to
31a3fcd
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 @rishabh-997 !
Description of what I changed
Issue I worked on
JIRA Issue: https://issues.openmrs.org/browse/AC-634
Checklist: I completed these to help reviewers :)
(the number above, next to the 'Commits' tab is 1).
existing code that was well tested you do not have to add tests)