Why this cache doesn't work using final as modifier
Posted
by Pentium10
on Stack Overflow
See other posts from Stack Overflow
or by Pentium10
Published on 2010-05-16T21:17:52Z
Indexed on
2010/05/16
21:20 UTC
Read the original article
Hit count: 232
I have this code to get the Cursor once for this instance, and the Log shows it is called many times although I marked as final. What I am missing?
private Cursor getAllContactsCached() {
final Cursor c=this.getList();
return c;
}
getAllContactsCached method should retrieve list once, and the 2nd time it should reuse the final object for return
© Stack Overflow or respective owner