abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r439035 - /incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
Date Thu, 31 Aug 2006 19:56:27 GMT
Author: jmsnell
Date: Thu Aug 31 12:56:26 2006
New Revision: 439035

URL: http://svn.apache.org/viewvc?rev=439035&view=rev
Log:
Return a copy of the default namespaces, not a shared instance of those

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java?rev=439035&r1=439034&r2=439035&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractXPath.java
Thu Aug 31 12:56:26 2006
@@ -31,11 +31,12 @@
   private Map<String,String> namespaces = null;
   
   public Map<String, String> getDefaultNamespaces() {
-    if (namespaces == null) 
+    if (namespaces == null)  {
       namespaces = new HashMap<String,String>();
-    namespaces.put("a", Constants.ATOM_NS);
-    namespaces.put("app", Constants.APP_NS);
-    return namespaces;
+      namespaces.put("a", Constants.ATOM_NS);
+      namespaces.put("app", Constants.APP_NS);
+    }
+    return new HashMap<String,String>(namespaces);
   }
 
   public void setDefaultNamespaces(Map<String, String> namespaces) {



Mime
View raw message