I have the following UserData class public class UserData implements Serializable { private String name; private long timestamp; ... } Then in another class (which implements com.google.gwt.user.server.rpc.RemoteServiceServlet) I have a localUser member variable declared like so: private transient ThreadLocal<UserData> localUser; Finally, in the same class I have the following method: private void setUser(final UserData userData) { if(userData == null) throw new NullPointerException("userData is null");
if (localUser == null) { localUser = new ThreadLocal<UserData>(); } localUser.set(userData); // The following is for test/debug purposes only. if(!userData.equals(localUser.get())){ if(localUser.get() == null){ l.severe("Mean bug: localUser.get() == null"); } else { l.severe("Mean bug: localUser and userData are not equal"); } } } Sometimes the code logs the l.severe("Mean bug: localUser.get() == null"); message as I believe that a localUser.get() should always return a valid reference to userData since it has been set to it in the previous statement. Has anyone had the same problem? I use the 1.5.4 appengine SDK. I reported the issue here:http://code.google.com/p/googleappengine/issues/detail?id=6010 Thanks for Your time. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/g3DDTArWUZsJ. 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.