Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 32265 invoked from network); 15 Nov 2006 20:53:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Nov 2006 20:53:15 -0000 Received: (qmail 29722 invoked by uid 500); 15 Nov 2006 20:53:09 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 29705 invoked by uid 500); 15 Nov 2006 20:53:09 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 29694 invoked by uid 99); 15 Nov 2006 20:53:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Nov 2006 12:53:09 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [63.240.77.82] (HELO sccrmhc12.comcast.net) (63.240.77.82) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Nov 2006 12:52:55 -0800 Received: from [192.168.1.47] (c-69-143-26-154.hsd1.va.comcast.net[69.143.26.154]) by comcast.net (sccrmhc12) with ESMTP id <2006111520523401200ouacee>; Wed, 15 Nov 2006 20:52:34 +0000 Message-ID: <455B7E05.8070604@christopherschultz.net> Date: Wed, 15 Nov 2006 15:52:21 -0500 From: Christopher Schultz User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: How do I ........? References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, Caldarale, Charles R wrote: >> From: Steve R Burrus [mailto:burrus1@swbell.net] >> just a tiny correction for you Chris, and that is that the >> code ought to >> be "if(in = = null)" not as u had it "if(null = = in)". Am I >> right or not? > > No, you're not. The order of operands makes no difference for an > equality test. (And don't put spaces in the middle of operators - > that's not what Chris wrote.) My use of the 'null' argument first in equality checking comes from my use of the C programming language. In C, this is a valid statement and generally does not do what you want: if(in = null) In Java, this is a syntax error. (Note the single = sign, indicating assignment, instead of a double == indicating comparison). Since you get bitten in C by missing an equals (it's quite easily to miss it visually), I got into the habit of putting the null first. As Chuck points out, it's exactly the same thing. Oh, and you can't put spaces between the equals signs, or the compiler won't recognize it as the equality operator. The equality operator is "==". It is /not/ two equals signs, contrary to popular belief. Spaces are simply not allowed. Why the heck are we discussing things like this on a mailing list for an app server!? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFW34F9CaO5/Lv0PARAl9TAKCrxUD0kgy+8CqsQulbl5TRNzuC2gCgjjEa Gi0vYdQJ4gp3B5uE+YyzFJE= =2zBd -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org