Keep reading, Tom... :)

(Joe-Bob says "catch up on *all* the mail before you reply")

--G

> -----Original Message-----
> From: Tom Jordahl [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 06, 2003 11:54 AM
> To: '[EMAIL PROTECTED]'
> Cc: 'Rich Scheuerle (E-mail)'
> Subject: RE: Q. about equals() in WSDL generated datatypes 
> 
> 
> 
> While I wrote the original (lame) implementation of equals(), 
> Rich Scheuerle wrote the more complicated (and more correct) 
> version that is emitted today.
> 
> Rich?
> 
> --
> Tom Jordahl
> Macromedia Server Development
> 
> 
> 
> -----Original Message-----
> From: Steve Loughran [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 3:39 PM
> To: axis-dev
> Subject: Q. about equals() in WSDL generated datatypes 
> 
> 
> So I'm staring at the equals() method that's been generated 
> for me from a
> datatype
> 
>     private java.lang.Object __equalsCalc = null;
> 
>     public synchronized boolean equals(java.lang.Object obj) {
>         if (!(obj instanceof JobInfo)) return false;
>         JobInfo other = (JobInfo) obj;
>         if (obj == null) return false;
>         if (this == obj) return true;
>         if (__equalsCalc != null) {
>             return (__equalsCalc == obj);
>         }
>         __equalsCalc = obj;
>         ...tests
>         __equalsCalc = null;
>         return _equals;
> 
> 
> My q. is: what is all this __equalsCalc stuff? It implies 
> that if there is a
> reentrant equality test then the test would return true while 
> the test is
> ongoing, but since the method is synchronized, you'd be hard 
> pressed to call
> equals() twice.
> 
> Is that what the __equalsCalc is there for? To catch recursion?
> 
> -steve
> 

Reply via email to