geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r540151 - /geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/GBeanOverride.java
Date Mon, 21 May 2007 14:17:43 GMT
Author: dwoods
Date: Mon May 21 07:17:42 2007
New Revision: 540151

URL: http://svn.apache.org/viewvc?view=rev&rev=540151
Log:
GERONIMO-3101 GBeanOverride.writeXml parseException of & amp

Modified:
    geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/GBeanOverride.java

Modified: geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/GBeanOverride.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/GBeanOverride.java?view=diff&rev=540151&r1=540150&r2=540151
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/GBeanOverride.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/GBeanOverride.java
Mon May 21 07:17:42 2007
@@ -415,6 +415,13 @@
                         DocumentBuilderFactory factory = XmlUtil.newDocumentBuilderFactory();
                         DocumentBuilder builder = factory.newDocumentBuilder();
 
+                        /**
+                         * if there was a value such as jdbc url with & then when
that value was oulled
+                         * from the config.xml the & would have been replaced/converted
to '&', we need to check
+                         * and change it back because an & would create a parse exception.
+                         */
+                        value = value.replaceAll("&(?!amp;)", "&");
+
                         // Wrap value in an element to be sure we can handle xml or text
values
                         String xml = "<fragment>" + value + "</fragment>";
                         InputSource input = new InputSource(new StringReader(xml));



Mime
View raw message