You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Glen Daniels <gl...@thoughtcraft.com> on 2007/04/15 18:52:56 UTC

Re: svn commit: r528654 - /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java

Hi Rich!

A couple of brief comments on this commit:

1) We really don't need to leave commented-out code (especially 
commented code that's been gone for a few revisions) in the source.  If 
people want to go back and look at prior versions that's very easy with 
SVN.  Let the SVN logs be the historical record (and the place to 
describe why we removed one bit and replaced it with another), and keep 
the code clean.  So I'd much rather see simply:

     public SOAPHeader getHeader() throws OMException {
         // The soap header is the first element in the envelope.
         OMElement e = getFirstElement();
         if (e instanceof SOAPHeader) {
             return (SOAPHeader)e;
         }

         return null;
     }

I went ahead and committed that change, let me know if you have any issues.

2) +1 for removing the getHeader() side-effect of creating a header, 
I've always thought this was dangerous to rely on myself.

--Glen

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org