greenDAO
greenDAO copied to clipboard
Blocker issue in Sonarqube
In AutoCreated file DaoMaster.java file, we can see the code:
public static DaoSession newDevSession(Context context, String name) { Database db = new DevOpenHelper(context, name).getWritableDb(); DaoMaster daoMaster = new DaoMaster(db); return daoMaster.newSession();}
the sonarqube show: Use try-with-resources or close this "DevOpenHelper" in a "finally" clause. Resources should be closed
The code is correct, the database should remain open. Otherwise the returned DaoSession would have no database to work with.
I suggest to ignore this message (maybe add a note).
Closing this issue due to inactivity. :zzz: Feel free to comment with more details or submit a new issue.