You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by "Harding, Christopher (Student Assistant)" <Ch...@softwareag.com> on 2001/07/06 13:48:10 UTC

NodeRevisionDescriptor

Hello,
  I've found a possible bug.

  When I use setContentLength(String) a 0 is always set instead of a value,
this is because Long.parseLong(String) always returns a null. new
Long(String) creates the correct value. So the code below work correctly.

-snip-
    /**
     * Creation length mutator.
     *
     * @param creationLength New content length
     */
    public void setContentLength(String contentLength) {
        Long contentLengthValue = new Long(contentLength);
        if (contentLengthValue == null) {
            contentLengthValue = new Long(0);
        }
        setProperty(CONTENT_LENGTH, contentLengthValue, true);

-snip-

Chris Harding

                  (xXXXX|xx======---(-
                  /     |
                 /    XX|	Christopher Harding
                /xxx XXX|
               /xxx X   |      Telephone :- (Direct)
              / ________|         +49-6151-92-1046    
      __ ____/_|_|_______\_    Extension    Room
  ###|=||________|_________|_     1046      282
      ~~   |==| __  _  __   /|~~~~~~~~~-------------_______
           |==| ||(( ||()| | |XXXXXXXX|                    >
      __   |==| ~~__~__~~__ \|_________-------------~~~~~~~
  ###|=||~~~~~~~~|_______  |"
      ~~ ~~~~\~|~|       /~
              \ ~~~~~~~~~
               \xxx X   |
                \xxx XXX|     Email :-
                 \    XX| Christopher.Harding@softwareag.com                
                  \     |                
                  (xXXXX|xx======---(-
                    ~~~~