Author: bbrodt
Date: 2010-10-04 10:45:24 -0400 (Mon, 04 Oct 2010)
New Revision: 25453
Modified:
branches/jbosstools-3.2.0.Beta1/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java
Log:
patch for JBIDE-6613
Modified:
branches/jbosstools-3.2.0.Beta1/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java
===================================================================
---
branches/jbosstools-3.2.0.Beta1/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java 2010-10-04
13:29:38 UTC (rev 25452)
+++
branches/jbosstools-3.2.0.Beta1/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java 2010-10-04
14:45:24 UTC (rev 25453)
@@ -209,9 +209,16 @@
// Add WSDLs that were resolved as imports, to the list
for (Resource res : resourceSet.getResources())
{
- Definition def = (Definition)res.getContents().get(0);
- if (!wsdlFiles.contains(def))
- wsdlFiles.add(def);
+ //
https://jira.jboss.org/browse/JBIDE-6613
+ // fix a dumb mistake: XSDs don't have Definitions
+ // and will cause this to throw a class cast exception
+ Object obj = res.getContents().get(0);
+ if ( obj instanceof Definition )
+ {
+ Definition def = (Definition)obj;
+ if (!wsdlFiles.contains(def))
+ wsdlFiles.add(def);
+ }
}
return wsdlFiles;
@@ -229,8 +236,11 @@
if (DeployUtils.isBPELFile(file)) {
// load it
Process currentProcess = loadBPEL(file, resourceSet);
- // stuff it in bpelFiles
- bpelFiles.add(currentProcess);
+ //
https://jira.jboss.org/browse/JBIDE-6613
+ // make sure the BPEL is valid.
+ if (currentProcess!=null)
+ // stuff it in bpelFiles
+ bpelFiles.add(currentProcess);
}
}