Title: [753] trunk/components/base: This test cannot pass when not run under JDK15.
Revision
753
Author
maguro
Date
2005-11-05 12:38:02 -0500 (Sat, 05 Nov 2005)

Log Message

This test cannot pass when not run under JDK15.

Modified Paths


Diff

Modified: trunk/components/base/project.xml (752 => 753)

--- trunk/components/base/project.xml	2005-11-04 17:06:47 UTC (rev 752)
+++ trunk/components/base/project.xml	2005-11-05 17:38:02 UTC (rev 753)
@@ -267,6 +267,11 @@
       <id>commons-discovery</id>
       <version>${commons_discovery_version}</version>
     </dependency>
+    <dependency>
+      <groupId>xml-apis</groupId>
+      <artifactId>xml-apis</artifactId>
+      <version>${xml_apis_version}</version>
+    </dependency>
 
     <!-- HTTP client -->
     <dependency>
@@ -618,7 +623,6 @@
 
         <!-- Java 5 only tests -->
         <exclude>**/ValidationTest.*</exclude>
-        <exclude>**/JAXPXPathExpressionTest.*</exclude>
 
         <!-- Disable until SM-145 is solved -->
         <exclude>**/JmsOverJcaWithFullXATest.*</exclude>

Modified: trunk/core/src/test/java/org/servicemix/_expression_/JAXPXPathExpressionTest.java (752 => 753)

--- trunk/core/src/test/java/org/servicemix/_expression_/JAXPXPathExpressionTest.java	2005-11-04 17:06:47 UTC (rev 752)
+++ trunk/core/src/test/java/org/servicemix/_expression_/JAXPXPathExpressionTest.java	2005-11-05 17:38:02 UTC (rev 753)
@@ -1,4 +1,4 @@
-/** 
+/**
  * 
  * Copyright 2005 LogicBlaze, Inc. http://www.logicblaze.com
  * 
@@ -18,7 +18,6 @@
 package org.servicemix._expression_;
 
 
-
 /**
  * @version $Revision$
  */
@@ -30,7 +29,18 @@
      * @throws Exception
      */
     public void testXPathUsingJAXP() throws Exception {
-        assertExpression(new JAXPStringXPathExpression("/foo/bar/@xyz"), "cheese", "<foo><bar xyz='cheese'/></foo>");
-        assertExpression(new JAXPStringXPathExpression("$name"), "James", "<foo><bar xyz='cheese'/></foo>");
+        boolean test = false;
+
+        try {
+            Class.forName("java.lang.annotation.AnnotationTypeMismatchException");
+
+            test = true;
+        } catch (ClassNotFoundException doNothing) {
+        }
+
+        if (test) {
+            assertExpression(new JAXPStringXPathExpression("/foo/bar/@xyz"), "cheese", "<foo><bar xyz='cheese'/></foo>");
+            assertExpression(new JAXPStringXPathExpression("$name"), "James", "<foo><bar xyz='cheese'/></foo>");
+        }
     }
 }

Reply via email to