From: Wolfgang M. M. <wol...@us...> - 2004-07-13 17:39:57
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28773/src/org/exist/xquery/functions Modified Files: ExtCollection.java Log Message: The collection() function throws a NullPointerException if the specified collection does not exist in the database. Index: ExtCollection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/ExtCollection.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ExtCollection.java 2 Jul 2004 16:53:55 -0000 1.6 --- ExtCollection.java 13 Jul 2004 17:39:49 -0000 1.7 *************** *** 102,106 **** String next = (String)args.get(i); Collection coll = context.getBroker().getCollection(next); ! coll.allDocs(context.getBroker(), docs, includeSubCollections, true); } NodeSet result = new ExtArrayNodeSet(docs.getLength(), 1); --- 102,107 ---- String next = (String)args.get(i); Collection coll = context.getBroker().getCollection(next); ! if(coll != null) ! coll.allDocs(context.getBroker(), docs, includeSubCollections, true); } NodeSet result = new ExtArrayNodeSet(docs.getLength(), 1); |