costin      01/02/10 13:17:42

  Modified:    src/share/org/apache/tomcat/util/http Parameters.java
  Log:
  Fixes for NPE ( the new test )
  
  Revision  Changes    Path
  1.9       +9 -1      
jakarta-tomcat/src/share/org/apache/tomcat/util/http/Parameters.java
  
  Index: Parameters.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/http/Parameters.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Parameters.java   2001/02/07 07:01:30     1.8
  +++ Parameters.java   2001/02/10 21:17:42     1.9
  @@ -141,6 +141,11 @@
        // create a new element in the linked list
        // note that we reuse the child, if any - pop will not
        // set child to null !
  +     if( currentChild==null ) {
  +         currentChild=new Parameters();
  +         currentChild.parent=this;
  +         return;
  +     }
        if( currentChild.child==null ) {
            currentChild.child=new Parameters();
            currentChild.child.parent=currentChild;
  @@ -198,7 +203,8 @@
        */
       private void merge() {
        // recursive
  -
  +     //System.out.println("Merging " + this + " with " +
  +     //   parent + " " + didMerge);
        // Local parameters first - they take precedence as in spec.
        handleQueryParameters();
   
  @@ -235,6 +241,8 @@
        if( didQueryParameters ) return;
        
        didQueryParameters=true;
  +     if( queryMB==null )
  +         return;
        String qString=queryMB.toString();
        if(qString!=null) {
            processFormData( qString );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to