db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r988321 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/XplainStatisticsTest.java
Date Mon, 23 Aug 2010 21:39:42 GMT
Author: kmarsden
Date: Mon Aug 23 21:39:42 2010
New Revision: 988321

URL: http://svn.apache.org/viewvc?rev=988321&view=rev
Log:
DERBY-4781 suites.All fails completely with Failed to invoke suite():java.lang.reflect.InvocationTargetException
because of XplainStatisticsTest

Change getADocument() to  return an Object instead of Document so weme does not fail to load
the class.

Contributed by Knut Anders Hatlen


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/XplainStatisticsTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/XplainStatisticsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/XplainStatisticsTest.java?rev=988321&r1=988320&r2=988321&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/XplainStatisticsTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/XplainStatisticsTest.java
Mon Aug 23 21:39:42 2010
@@ -631,7 +631,7 @@ public class XplainStatisticsTest extend
      * @return a Document object
      * @throws Exception
      */
-    private Document getADocument(final String file) throws Exception{
+    private Object getADocument(final String file) throws Exception {
     	Document document;
     	DocumentBuilderFactory factory =
     		DocumentBuilderFactory.newInstance();
@@ -662,8 +662,7 @@ public class XplainStatisticsTest extend
     private String readStatement(final String file)
     throws Exception
     {
-    	Document document;
-    	document = getADocument(file);
+        Document document = (Document) getADocument(file);
 
     	return document.getElementsByTagName("statement").item(0).getChildNodes().item(0).getNodeValue();
 
@@ -677,8 +676,7 @@ public class XplainStatisticsTest extend
      * @throws Exception
      */
     private int countNode(final String file) throws Exception{
-    	Document document;
-    	document = getADocument(file);
+        Document document = (Document) getADocument(file);
 
     	return document.getElementsByTagName("node").getLength();
     }
@@ -692,8 +690,7 @@ public class XplainStatisticsTest extend
      * @throws Exception
      */
     private String getNodeName(final String file) throws Exception{
-    	Document document;
-    	document = getADocument(file);
+        Document document = (Document) getADocument(file);
     	NodeList lst=document.getElementsByTagName("node");
     	String name= "";
     	for(int i=0;i<lst.getLength();i++)
@@ -712,8 +709,7 @@ public class XplainStatisticsTest extend
      * @throws Exception
      */
     private String getNodeAttribute(final String file, String attribute, int node) throws
Exception{
-    	Document document;
-    	document = getADocument(file);
+    	Document document = (Document) getADocument(file);
     	NodeList lst=document.getElementsByTagName("node");
     	if(lst.item(node).getAttributes().getNamedItem(attribute)==null)
     		return "";



Mime
View raw message