Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
cl...@google.com <cl...@google.com> #2
Could this also help with the problem where a non-nullable type can be null because nullability is not inferred in the generated Java code? E.g., having a query returning a LiveData<Pojo> but the table of Pojo's is empty so the LiveData will trigger an update with a null value that shouldn't be null (or maybe that is a plain bug).
ap...@google.com <ap...@google.com> #4
From what I can see, there is no nullability annotation in the generated DAO code (as of Room 2.2.0-rc01) when returning LiveData. The result object is declared and returned uninitialized if the cursor is empty. Or I might be reading it wrong.
jo...@gmail.com <jo...@gmail.com> #5
VOTE +100500
pr...@google.com <pr...@google.com> #6
Maybe for first step (if kotlin obly project) don generate kotlin class files from java sources and delete Java gen sources. Becouse another annotation processors reread it. I think it's normal what IMPL classes will be only in bin/disassembled modules
Description
Technical Details
This sample app showcases how there is no error propagation available when using default PagingSource in queries. The sample app has a text field that filters a list of animals. The MATCH statement is used to throw an Exception but there may be other ways to do this as well.
Steps to reproduce:
Under the covers, the default implementation of PagingSource in DAO queries is LimitOffsetPagingSource.
In this particular case, we have options to mitigate this:
In lieu of an actual fix, there should probably be documentation that acknowledges and warns about situations using the default PagingSource, particularly in instances where the MATCH statement is used with user input since this is a common use case with FTS4 entities that requires special care.
There are a few StackOverflow issues that mention this issue, both reported years ago, but I could not find any bug reports: