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.
|
f4ww4z
left a comment
There was a problem hiding this comment.
@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.
Do we need to serialize every variable in model classes anymore?
There was a problem hiding this comment.
I think its important because of following line in the code
There was a problem hiding this comment.
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
f4ww4z
left a comment
There was a problem hiding this comment.
@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.
Please avoid star imports.
|
|
||
| override var uuid: String? | ||
| get() = uuid | ||
| set(uuid) { |
There was a problem hiding this comment.
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
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)