tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r657844 - /incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java
Date Mon, 19 May 2008 14:49:07 GMT
Author: slaws
Date: Mon May 19 07:49:07 2008
New Revision: 657844

URL: http://svn.apache.org/viewvc?rev=657844&view=rev
Log:
Ensure that tuscany-sca.xsd allways appears first in the list of schemas as extension schemas
invariably depend on it. 

Modified:
    incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java

Modified: incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java?rev=657844&r1=657843&r2=657844&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java
(original)
+++ incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java
Mon May 19 07:49:07 2008
@@ -61,7 +61,10 @@
             schemaDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations("org.apache.tuscany.sca.contribution.processor.ValidationSchema");
         } catch (IOException e) {
             throw new IllegalStateException(e);
-        }
+        }      
+        
+        // TODO - temp fix to ensure that the schema tuscany-sca.xsd always comes first
+        String tuscanyScaXsd = null;
         
         // Find each schema
         for (ServiceDeclaration schemaDeclaration: schemaDeclarations) {
@@ -69,7 +72,16 @@
             if (url == null) {
                 throw new IllegalArgumentException(new FileNotFoundException(schemaDeclaration.getClassName()));
             }
-            schemas.add(url.toString());
+            
+            if (url.toString().contains("tuscany-sca.xsd")){
+                tuscanyScaXsd = url.toString();
+            } else {
+                schemas.add(url.toString());
+            }
+        }
+        
+        if (tuscanyScaXsd != null){
+            schemas.add(0, tuscanyScaXsd);
         }
         
         loaded = true;



Mime
View raw message