Re: [OT] of the different methods to get a user-id

2009-02-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter,

On 2/17/2009 5:08 AM, Peter Crowther wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 IMHO, you either have control of your production environment
 yourself (and can do whatever you want) or you have an ops team
 with complete control of your production environment (and they
 ought to be able to handle scary stuff like scheduling cron jobs
 and running shell scripts) or you have no control whatsoever and
 therefore do not have a production environment.
 
 Chris, how would you handle the case of writing software for
 installation by third parties in environments over which you have no
 control?  Those third parties' environments are still production
 environments, but you have no control over them.

I see that situation as a special case of you have an OPS team. If
your customers want to control their boxes, they should know how to do
thing like schedule jobs.

Maintaining server software just isn't as simple as babysitting
something like Microsoft Office. Customers have to understand that.
Those customers who aren't qualified to maintain their installations of
your server software should start paying YOU to maintain them properly.
That's another revenue stream for you. Be happy!

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmcWVcACgkQ9CaO5/Lv0PCu4gCgs/GdyLEtpfatGosImZtlPs5N
uyEAoKxUcaZNt8PnMpWZcEBsovhSrMq9
=y5MR
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] of the different methods to get a user-id

2009-02-17 Thread Peter Crowther
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 IMHO, you either
 have control of your production environment yourself (and can do
 whatever you want) or you have an ops team with complete
 control of your
 production environment (and they ought to be able to handle
 scary stuff
 like scheduling cron jobs and running shell scripts) or you have no
 control whatsoever and therefore do not have a production environment.

Chris, how would you handle the case of writing software for installation by 
third parties in environments over which you have no control?  Those third 
parties' environments are still production environments, but you have no 
control over them.

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] of the different methods to get a user-id

2009-02-17 Thread André Warnier
Just in case it was missed in the subsequent conflagration (and I always 
marvel at how easy it is to start a conflagration by saying something 
like language X is better than language Y), I would just like to state 
that my blurb was meant to be taken lightly, with ;-) and so on.


Comparing programming languages is a lot like comparing Microsoft 
software to Open Source, or comparing car brands, or (in my younger 
times) comparing stereo brands, etc..


One more thing I would like to add however to all the Java crazies 
around here, at least the open-minded subset of them : perl is fun.  I 
am not saying that it is the ideal language to develop a large 
application with a team of people, and I am not saying that it is faster 
or better or uses less memory or any of these things (though it does, 
really).  But it is, definitely, more /fun/ than Java.  And you can do 
serious things with it too.


And a serious tip : if you are ever in the situation of having to start 
a new project on some theme you know nothing about (say, credit card 
payments, or talking to Amazon, or filtering emails, or reading 
meta-data in photos, or stemming German words, or authenticating against 
OpenId,..), then you could do worse than first having a look at the Perl 
module library (http://kobesearch.cpan.org/), and perusing the perl 
modules documentation. Even if you know nothing of perl and don't want 
to know anything about it, the documentation of these (hundreds of) 
modules, all in one place and searchable, is one of the best sources of 
information I know.  It is like a Wikipedia of everything one can do 
with software.


And if in addition to be a Java fan, you're also an OO fan, search for 
class.  Don't the names just sound like fun ?


Is there, by the way, any comparable source for Java libraries ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] of the different methods to get a user-id

2009-02-17 Thread Peter Crowther
 From: Ken Bowen [mailto:kbo...@als.com]
 The only thing more fiery than language X is better than language Y
 is editor Z is better than editor W  :-)

To skip a few levels in the inevitable impending debate...

Well I edited the inodes by hand.  With magnets.  
(http://www.userfriendly.org)

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] of the different methods to get a user-id

2009-02-17 Thread Ken Bowen
The only thing more fiery than language X is better than language Y  
is editor Z is better than editor W  :-)


On Feb 17, 2009, at 9:45 AM, André Warnier wrote:


language X is better than language Y



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] of the different methods to get a user-id

2009-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/12/2009 10:27 PM, Caldarale, Charles R wrote:
 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.

But sometimes the value is surprising.

For instance.

i = i++

yields different results depending on what language you are using. C and
Java produce different outputs (which really surprised me!).

 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.

I'm not saying it's not legal, I'm just saying it's not extensible. If a
superclass wants to override getUserPrincipal for some reason, the
subclass doesn't benefit (or doesn't work, in certain situations). Thsi
is one of the reasons I hate using protected members: members become
part of the interface, which is ... weird.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmZ1jkACgkQ9CaO5/Lv0PAu7ACeKb+mqxYgZbHC8VDd+PRQAsvZ
B4MAnRYVo2/2eMA5ILWXGWvZik/2lJDo
=5EcI
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] of the different methods to get a user-id

2009-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

What the hell.. let's start a holy war?!

On 2/13/2009 10:25 AM, André Warnier wrote:
 Their merit is all the greater since
 they work in the obscure non-graphical background, they never get any of
 the attention, and they have to share machines with some Java programs,
 which means they get only the usage of a tiny fraction of the RAM and
 CPU cycles, although they do most of the real work and have to do it
 with a single thread each.

Hear, hear!

 Even some of the old-school programmers, mostly in their later years,
 succumb to the what-the-heck syndrome and come to appreciate the sense
 of security and comfort provided by strongly-typed and rigidly
 object-oriented languages

Heck, lots of folks on this list won't even use cron to schedule jobs.
Instead, they write web applications wrapped around Quartz because it's
just easier to deploy or some other such nonsense. IMHO, you either
have control of your production environment yourself (and can do
whatever you want) or you have an ops team with complete control of your
production environment (and they ought to be able to handle scary stuff
like scheduling cron jobs and running shell scripts) or you have no
control whatsoever and therefore do not have a production environment.
There, I said it. :p

On the other hand, seeing object-oriented perl really makes me queasy.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmZ2FIACgkQ9CaO5/Lv0PDOQgCeJno3T9D2GnoWpTFswcvInUCn
zpcAnijMpytndgIfPe6knYmum47WOj56
=QFoD
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] of the different methods to get a user-id

2009-02-16 Thread Alan Chaney

Chris,

I offer my opinions here as a real grey beard (literally). I certainly 
agree with you that people should have

a breath of skills allowing them to use the right tool at the right time.

However, notwithstanding the fact that the other day I worked out that I 
have actually used about 15 different programming languages in anger 
(that is, part of code used by other people) I have to admit that my 
occasional brush with Perl has been unrewarding (for both me and the 
language...)


My biggest problem is that I've never seen a little bit of typing as a 
big issue, but reading and trying to understand something a few 
weeks/months/years later is always fraught with difficulties. The main 
problem with perl is that I can never remember exactly what #...@!$% means 
whereas something like getUserPrincipal() works for me!


Regards

Alan Chaney


Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

What the hell.. let's start a holy war?!

On 2/13/2009 10:25 AM, André Warnier wrote:
  

Their merit is all the greater since
they work in the obscure non-graphical background, they never get any of
the attention, and they have to share machines with some Java programs,
which means they get only the usage of a tiny fraction of the RAM and
CPU cycles, although they do most of the real work and have to do it
with a single thread each.



Hear, hear!

  

Even some of the old-school programmers, mostly in their later years,
succumb to the what-the-heck syndrome and come to appreciate the sense
of security and comfort provided by strongly-typed and rigidly
object-oriented languages



Heck, lots of folks on this list won't even use cron to schedule jobs.
Instead, they write web applications wrapped around Quartz because it's
just easier to deploy or some other such nonsense. IMHO, you either
have control of your production environment yourself (and can do
whatever you want) or you have an ops team with complete control of your
production environment (and they ought to be able to handle scary stuff
like scheduling cron jobs and running shell scripts) or you have no
control whatsoever and therefore do not have a production environment.
There, I said it. :p

On the other hand, seeing object-oriented perl really makes me queasy.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmZ2FIACgkQ9CaO5/Lv0PDOQgCeJno3T9D2GnoWpTFswcvInUCn
zpcAnijMpytndgIfPe6knYmum47WOj56
=QFoD
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



!DSPAM:4999da4713771562881678!

  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] of the different methods to get a user-id

2009-02-16 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] of the different methods to get a user-id

 For instance.
 i = i++

 yields different results depending on what language
 you are using. C and Java produce different outputs
 (which really surprised me!).

Java explicitly defines the behavior of the above statement, whereas the C 
standard does not, and leaves it up to the implementation to decide what to do. 
 However, on almost every platform I have access to right at this moment 
(Windows, Linux, proprietary), printing the value of i after your test 
statement in both C and Java displayed the original value of i (as expected), 
not the increment thereof.  The one problematic environment that gave the 
unexpected answer was Visual C++ 6.0 on Windows (gee, Microsoft ignores 
standard practice? who would a-thunk it); gcc on Windows worked properly.

 - 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



Re: [OT] of the different methods to get a user-id

2009-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/16/2009 5:19 PM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] of the different methods to get a user-id

 For instance.
 i = i++

 yields different results depending on what language
 you are using. C and Java produce different outputs
 (which really surprised me!).
 
 Java explicitly defines the behavior of the above statement, whereas
 the C standard does not, and leaves it up to the implementation to
 decide what to do. However, on almost every platform I have access to
 right at this moment (Windows, Linux, proprietary), printing the value
 of i after your test statement in both C and Java displayed the original
 value of i (as expected), not the increment thereof.

$ java -version
java version 1.5.0_13
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)

$ javac PostIncrementTest.java (see below)
$ java PostIncrementTest
0
0
0
$ cc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cc -o post_increment_test post_increment_test.c  (see below)
$ ./post_increment_test
0 0 1
$

I'm not sure what to say. Here are the sources:

post_increment_test.c:
#include stdio.h

int main() {
  printf(%d %d %d\n, test1(), test2(), test3());

  return 0;
}

int test1() {
  int i = 0;

  return i++;
}

int test2() {
  int i = 0;

  return (i++);
}

int test3() {
  int i = 0;

  i = i++;

  return i;
}

PostIncrementTest.java:
public class PostIncrementTest
{
public static void main(String[] args)
{
System.out.println(test1());
System.out.println(test2());
System.out.println(test3());
}

public static int test1()
{
int i=0;

return i++;
}

public static int test2()
{
int i=0;

return (i++);
}


public static int test3()
{
int i=0;

i = i++;

return i;
}
}

 The one problematic environment that gave the unexpected answer was
 Visual C++ 6.0 on Windows (gee, Microsoft ignores standard practice?
 who would a-thunk it); gcc on Windows worked properly.

Do you mean gcc on win32 worked as you expected? As you said, C does not
define this behavior, so proper is in the eye...

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmZ6l4ACgkQ9CaO5/Lv0PB+RQCffUOOV9Lv6tuBfSoG1e5mcvmm
YA4AoJoFhjoMaIbxCwqe6nxyPfh7fhcX
=0Dpi
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] of the different methods to get a user-id

2009-02-16 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] of the different methods to get a user-id

 Do you mean gcc on win32 worked as you expected?

Yes, it produced the same results as Java.

 - 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



Re: [OT] of the different methods to get a user-id

2009-02-13 Thread André Warnier

Caldarale, Charles R wrote:

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.


I was going to let that one pass, but now I'm provoked.
The expressions above do work differently in Perl.

1) caller side :

a) my $var = getRemoteUser();
sets a /scalar/ context for the call. Means that the caller expects a 
single value in return.


b) my @var = getRemoteUser();
sets a /list/ context for the call.  Indicates that the caller expects a 
list (an array) in return.


2) callee side :

a) return i++;
Returns the value of i prior to the post-increment, as a scalar value.
So it fits with 1a.

b) return (i++);
Returns a list composed of 1 element : the value of i before the 
post-increment.

So it fits with 1b.

But..
if you combine the call 1a
my $var = getRemoteUser();
with the version 2b : return (i++)
then when you get in $var is 1, always.

That is because since
my $var = getRemoteUser();
expects a scalar, but what it gets is a list, it does an implicit
my $var = (list), which equivalent to
my $var = scalar(list)
which returns the number of elements present in the array/list.

However, the calle sub can be cleverer and anticipate this, by doing :
return wantarray ? (i++) : i++;
thus checking in which context it is being called, and returning the 
appropriate form of response.


Perl is great !



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] of the different methods to get a user-id

2009-02-13 Thread Peter Crowther
 From: André Warnier [mailto:a...@ice-sa.com]
 I was going to let that one pass, but now I'm provoked.
 The expressions above do work differently in Perl.
[...]
 However, the calle sub can be cleverer and anticipate this, by doing :
 return wantarray ? (i++) : i++;
 thus checking in which context it is being called, and returning the
 appropriate form of response.

 Perl is great !

Thank you.  Although I don't need any further reasons to avoid that camel of a 
language whenever I can, it's always nice to find another really good reason to 
avoid it...

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] of the different methods to get a user-id

2009-02-13 Thread Caldarale, Charles R
 From: Peter Crowther [mailto:peter.crowt...@melandra.com]
 Subject: RE: [OT] of the different methods to get a user-id

 Thank you.  Although I don't need any further reasons to
 avoid that camel of a language whenever I can, it's always
 nice to find another really good reason to avoid it...

Hear, hear!  In a past life, a guy I know actually wrote a suite of production 
programs in APL - which was even more cryptic (but also more logical) than Perl.

 - 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



RE: [OT] of the different methods to get a user-id

2009-02-13 Thread Peter Crowther
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Hear, hear!  In a past life, a guy I know actually wrote a
 suite of production programs in APL - which was even more
 cryptic (but also more logical) than Perl.

Dedication indeed!  Did he need the custom golfball for the teletype with the 
special symbols, or was the interface a little more modern than that?

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] of the different methods to get a user-id

2009-02-13 Thread André Warnier

Peter Crowther wrote:

From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Hear, hear!  In a past life, a guy I know actually wrote a
suite of production programs in APL - which was even more
cryptic (but also more logical) than Perl.


Dedication indeed!  Did he need the custom golfball for the teletype with the 
special symbols, or was the interface a little more modern than that?

I have to admit that we have several production applications written 
almost entirely in Perl.  They chug along since several years, 
processing several thousand documents a day, from MS-Word through PDFs 
to CAD/CAM drawings and emails, digesting them and making them 
searchable for grateful users.  Their merit is all the greater since 
they work in the obscure non-graphical background, they never get any of 
the attention, and they have to share machines with some Java programs, 
which means they get only the usage of a tiny fraction of the RAM and 
CPU cycles, although they do most of the real work and have to do it 
with a single thread each.
But such is the the deplorable state of our educational systems nowadays 
that one can no longer find real sharp logical young minds capable of 
designing efficient and reliable systems from scratch. So one has to 
depend instead on rigid frameworks and on programming languages like 
Java, which severely constrain the programmer's imagination, but make it 
less likely that one would land in trouble.
Even some of the old-school programmers, mostly in their later years, 
succumb to the what-the-heck syndrome and come to appreciate the sense 
of security and comfort provided by strongly-typed and rigidly 
object-oriented languages, with which one can just dedicate one thread 
to collect the memory garbage left over by sloppy programs, another to 
collect  loose database connections, another to kill off poor abandoned 
objects, another to optimise badly-written lines of code etc.
One has to wonder however if some day, the same kind of meltdown as we 
are currently seeing in the bloated world of finance, will not strike 
these over-engineered monsters, and if there will not be massive thread 
and memory layoffs.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] of the different methods to get a user-id

2009-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/12/2009 1:22 PM, Caldarale, Charles R wrote:
 
 As Pid surmised, it's not Tomcat that is giving you different
 answers.
 Here's Tomcat's implementation of HttpServletRequest.getRemoteUser():
 
 public String getRemoteUser() {
 if (userPrincipal != null) {
 return (userPrincipal.getName());
 } else {
 return (null);
 }
 }
 
 [Aside: Don't know why people think return statements need
 parentheses; maybe they get paid for programming based on the number of
 characters used.]

I don't understand that, either. I suppose this works differently in
different languages, though:

return i++;

return (i++);

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. Not sure
what, though.

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.

Oh, well.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmU4hwACgkQ9CaO5/Lv0PB5qACghJ4CDsMAjEuyQ+qDBWc/NwUd
8SEAn284vqUekj//e5wSXD5gUSVvXb4q
=P0xs
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] of the different methods to get a user-id

2009-02-12 Thread Caldarale, Charles R
 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