Sorry to jump the gun and reply before seeing this.

I swear I *did* check for replies to the message before sending, but Outlook 
apparently didn't recognize this message as a reply.  (#$%@ Outlook....)

--
Tom Jordahl
Macromedia Server Development



-----Original Message-----
From: R J Scheuerle Jr [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 8:27 PM
To: [EMAIL PROTECTED]
Subject: Re: Q. about equals() in WSDL generated datatypes



Yes __equalsCal was meant to support equals for objects that had direct or
indirectly references back to the object.

Rich Scheuerle
IBM WebSphere & Axis Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                       
                                  
                      "Steve Loughran"                                                 
                                  
                      <[EMAIL PROTECTED]        To:       "axis-dev" 
<[EMAIL PROTECTED]>                            
                      om>                      cc:                                     
                                  
                                               Subject:  Q. about equals() in WSDL 
generated datatypes                   
                      12/18/2002 02:38                                                 
                                  
                      PM                                                               
                                  
                      Please respond to                                                
                                  
                      axis-dev                                                         
                                  
                                                                                       
                                  
                                                                                       
                                  




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