> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: [OT] of the different methods to get a user-id > > I don't understand that, either. I suppose this works differently in > different languages, though: > > return i++; > > return (i++);
Not any that I'm aware of; the value of the i++ expression is the same, regardless of the number of parentheses you wrap it in. > I tried in C and Java and got the same result (both > return the original value of i), though I would have > expected something different. Nope; the parentheses in such a statement control only operator precedence, not anything else. Don't confuse parentheses used in an expression with those used for function calls or if/while statements - they're syntactically different, even if they share the same code point. > What I also don't understand is why userPrincipal is used directly > instead of this.getUserPrincipal, which would allow some measure of > extensibility of the class. Since the userPrincipal field is protected, not private, the subclass can just use it to store its Principal object, so I don't see a real problem. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org