Update TinyDB.java

Replaced editor.commit();  with  editor.apply();