treehouses / remote

⚡ control Raspberry Pi from Android Device through Bluetooth ⚡
https://play.google.com/store/apps/details?id=io.treehouses.remote
GNU Affero General Public License v3.0
61 stars 27 forks source link

actions: fix servicesviewmodel error #2053

Closed dogi closed 5 days ago

dogi commented 1 week ago

https://github.com/treehouses/remote/actions/runs/9553606429/job/26332797279#step:6:244

/home/runner/work/remote/remote/app/src/main/kotlin/io/***/remote/ui/services/ServicesViewModel.kt:118: Error: Expected non-nullable value [NullSafeMutableLiveData from androidx.lifecycle]
            cacheServiceData.value = rawData
                                     ~~~~~~~

   Explanation for issues of type "NullSafeMutableLiveData":
   This check ensures that LiveData values are not null when explicitly       
            declared as non-nullable.

                   Kotlin interoperability does not support enforcing explicit
   null-safety when using                 generic Java type parameters. Since
   LiveData is a Java class its value can always                 be null even
   when its type is explicitly declared as non-nullable. This can lead        
           to runtime exceptions from reading a null LiveData value that is
   assumed to be                 non-nullable.

   Vendor: Android Open Source Project
   Identifier: androidx.lifecycle
   Feedback: https://issuetracker.google.com/issues/new?component=413132