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 lu...@apache.org on 2005/03/11 10:50:37 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/search/basic BasicQueryScope.java

luetzkendorf    2005/03/11 01:50:37

  Modified:    src/share/org/apache/slide/search/basic BasicQueryScope.java
  Log:
  fix: NPE with missing <scope>
  
  Revision  Changes    Path
  1.15      +8 -4      jakarta-slide/src/share/org/apache/slide/search/basic/BasicQueryScope.java
  
  Index: BasicQueryScope.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/BasicQueryScope.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- BasicQueryScope.java	1 Nov 2004 17:58:02 -0000	1.14
  +++ BasicQueryScope.java	11 Mar 2005 09:50:37 -0000	1.15
  @@ -106,6 +106,10 @@
           
           Element scope = fromElement.getChild (Literals.SCOPE, namespace);
           
  +        if (scope == null) {
  +            throw new BadQueryException("expected DAV:scope");
  +        }
  +        
           if (scope.getChildren (Literals.HREF, namespace).size() != 1) {
               throw new BadQueryException ("exactly one href element must be defined");
           }
  
  
  

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