From: <wol...@us...> - 2004-03-08 11:45:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257/src/org/exist/xquery Modified Files: XQueryContext.java Log Message: * class BrokerPool now detects if a thread does already hold a broker object and increments a reference count instead of returning a new object. Otherwise, deadlock situations could occurr. * documentCache in RpcConnection should be cleared if changes have been made to the database. * implemented missing getMembersAsResource method in RemoteResourceSet. Index: XQueryContext.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/XQueryContext.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** XQueryContext.java 5 Mar 2004 11:15:29 -0000 1.7 --- XQueryContext.java 8 Mar 2004 11:21:22 -0000 1.8 *************** *** 147,152 **** */ public void declareNamespace(String prefix, String uri) { ! if (prefix == null || uri == null) ! throw new IllegalArgumentException("null argument passed to declareNamespace"); namespaces.put(prefix, uri); prefixes.put(uri, prefix); --- 147,154 ---- */ public void declareNamespace(String prefix, String uri) { ! if (prefix == null) ! prefix = ""; ! if(uri == null) ! uri = ""; namespaces.put(prefix, uri); prefixes.put(uri, prefix); *************** *** 156,162 **** this.namespaces = namespaceMap; Map.Entry entry; for(Iterator i = namespaceMap.entrySet().iterator(); i.hasNext(); ) { entry = (Map.Entry)i.next(); ! prefixes.put(entry.getValue(), entry.getKey()); } } --- 158,171 ---- this.namespaces = namespaceMap; Map.Entry entry; + String prefix, uri; for(Iterator i = namespaceMap.entrySet().iterator(); i.hasNext(); ) { entry = (Map.Entry)i.next(); ! prefix = (String)entry.getKey(); ! uri = (String) entry.getValue(); ! if(prefix == null) ! prefix = ""; ! if(uri == null) ! uri = ""; ! prefixes.put(prefix, uri); } } |