db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1605364 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java
Date Wed, 25 Jun 2014 12:13:33 GMT
Author: kahatlen
Date: Wed Jun 25 12:13:32 2014
New Revision: 1605364

URL: http://svn.apache.org/r1605364
Log:
DERBY-6637: test errors failures in lang.XMLTypeAndOpsTest, XMLBindingTest and XMLConcurrencyTest
with ibm jvms

Work around quirk in IBM JVMs when security manager is enabled by
broadening a catch block to include the exception thrown by IBM in
such cases.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java?rev=1605364&r1=1605363&r2=1605364&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java Wed Jun 25
12:13:32 2014
@@ -278,7 +278,7 @@ public class SqlXmlUtil
              * continue to run as normal. 
              */
             throw StandardException.newException(
-                SQLState.LANG_XML_QUERY_ERROR, opName, te.getMessage());
+                SQLState.LANG_XML_QUERY_ERROR, te, opName, te.getMessage());
 
         }
     }
@@ -640,7 +640,12 @@ public class SqlXmlUtil
             Object result = query.evaluate(doc, XPathConstants.NODESET);
             returnType = XPathConstants.NODESET;
             return result;
-        } catch (XPathExpressionException xpee) {
+        } catch (Exception xpee) {
+            // Retry with the string type if an XPathExpressionException is
+            // thrown. The catch block is broader and retries on all kinds of
+            // exceptions. The reason is that IBM fails with a runtime
+            // exception that shadows the XPathExpressionException, if a
+            // security manager is installed. See DERBY-6637 for details.
             Object result = query.evaluate(doc, XPathConstants.STRING);
             returnType = XPathConstants.STRING;
             return result;



Mime
View raw message