Hello,

I just got bit by this strange java appengine behaviour.

Store a Boolean.FALSE value in memcache. (I'm using the lowlevel API
and this value was within other objects)

Retrieve this value from memcache.

(value instanceof Boolean) is still true
(value.booleanValue()) is still false

however.

( Boolean.FALSE.equals(value) ) is no longer true

It seems it comes out of memcache as a slightly different false value.
Presumably just a different FALSE object to Boolean.FALSE.

This came as a bit of a shock to me since the value I was caching was
admin=false setting in a users session. So this bug granted admin
abilities to everyone (Yay!) and was only triggered when I added some
better caching to the user sessions.

At least this is what I think was going on and simply avoiding
Boolean.FALSE.equals(value) fixed things.

This was going strange local and on a live server.

Anyone want to see if they can replicate this strangeness?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to