Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 12233 invoked from network); 25 Nov 2003 23:23:16 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 25 Nov 2003 23:23:16 -0000 Received: (qmail 76731 invoked by uid 500); 25 Nov 2003 23:13:38 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 76703 invoked by uid 500); 25 Nov 2003 23:13:38 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 76675 invoked by uid 500); 25 Nov 2003 23:13:38 -0000 Delivered-To: apmail-ws-axis-cvs@apache.org Date: 25 Nov 2003 23:13:50 -0000 Message-ID: <20031125231350.8140.qmail@minotaur.apache.org> From: dims@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/java/src/org/apache/axis MessageContext.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N dims 2003/11/25 15:13:50 Modified: java/src/org/apache/axis/utils LockableHashtable.java java/src/org/apache/axis MessageContext.java Log: Fix for Bug 23072 - MessageContext getPropertyNames is broken from arh14@cornell.edu (Aaron Hamid) Revision Changes Path 1.10 +27 -0 ws-axis/java/src/org/apache/axis/utils/LockableHashtable.java Index: LockableHashtable.java =================================================================== RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/LockableHashtable.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- LockableHashtable.java 27 Jun 2003 18:27:35 -0000 1.9 +++ LockableHashtable.java 25 Nov 2003 23:13:50 -0000 1.10 @@ -56,6 +56,8 @@ import java.util.Hashtable; import java.util.Vector; +import java.util.Set; +import java.util.HashSet; /** * This subclass of the java Hashtable allows individual @@ -100,6 +102,31 @@ public synchronized void setParent(Hashtable parent) { this.parent = parent; + } + + /** + * Gets the parent Hashtable for this object (if any) + */ + public synchronized Hashtable getParent() { + return parent; + } + + /** + * Returns the keys in this hashtable, and its parent chain + */ + public Set getAllKeys() { + HashSet set = new HashSet(); + set.addAll(super.keySet()); + Hashtable p = parent; + while (p != null) { + set.addAll(p.keySet()); + if (p instanceof LockableHashtable) { + p = ((LockableHashtable) p).getParent(); + } else { + p = null; + } + } + return set; } /** 1.138 +9 -0 ws-axis/java/src/org/apache/axis/MessageContext.java Index: MessageContext.java =================================================================== RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/MessageContext.java,v retrieving revision 1.137 retrieving revision 1.138 diff -u -r1.137 -r1.138 --- MessageContext.java 27 Oct 2003 19:56:19 -0000 1.137 +++ MessageContext.java 25 Nov 2003 23:13:50 -0000 1.138 @@ -952,6 +952,15 @@ } /** + * Returns an Iterator view of the names of the properties + * in this MessageContext and any parents of the LockableHashtable + * @return Iterator for the property names + */ + public java.util.Iterator getAllPropertyNames() { + return bag.getAllKeys().iterator(); + } + + /** * Returns the value associated with the named property - or null if not * defined/set. *