commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13108] - unnecessary reflection
Date Sun, 13 Oct 2002 03:36:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13108>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13108

unnecessary reflection

dmitri@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From dmitri@apache.org  2002-10-13 03:36 -------
I applied a path very similar to the suggested one.  The new code is:

    public Object getNode(){
        if (value == UNINITIALIZED){
            Object baseValue = getBaseValue();
            if (index == WHOLE_COLLECTION){
                value = baseValue;
            }
            else if (value != null && index >= 0 && index < getLength()){
                value = ValueUtils.getValue(baseValue, index);
            }
            else {
                value = null;
            }
        }
        return value;
    }

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message