Author: Grid.Qian
Date: 2011-07-04 03:16:04 -0400 (Mon, 04 Jul 2011)
New Revision: 32545
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
Log:
JBIDE-8288: BPMN to jBPM export broken - NPE
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-04
06:55:22 UTC (rev 32544)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-04
07:16:04 UTC (rev 32545)
@@ -91,7 +91,7 @@
return currentSelection;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean checkSelectedResources(ISelection selectedResources) {
boolean res = true;
if (selectedResources instanceof IStructuredSelection
@@ -100,8 +100,7 @@
for (Iterator it = ss.iterator(); it.hasNext();) {
Object o = it.next();
if (o instanceof IFile) {
- if (!((IFile) o).getFileExtension()
- .equalsIgnoreCase("bpmn")) {
+ if (!"bpmn".equalsIgnoreCase(((IFile) o).getFileExtension())) {
res = false;
break;
}
@@ -125,7 +124,7 @@
boolean res = false;
if (element instanceof IFile) {
IFile file = (IFile) element;
- if (file.getFileExtension().equalsIgnoreCase(BPMN_FILE_EXT)) {
+ if (BPMN_FILE_EXT.equalsIgnoreCase(file.getFileExtension())) {
res = file.getProject().isAccessible();
}
}
@@ -144,8 +143,7 @@
IResource[] resources = container.members();
for (int i = 0; i < resources.length; i++) {
if (resources[i] instanceof IFile
- && ((IFile) resources[i]).getFileExtension()
- .equalsIgnoreCase(BPMN_FILE_EXT)) {
+ && BPMN_FILE_EXT.equalsIgnoreCase(((IFile)
resources[i]).getFileExtension())) {
res = true;
break;
}
Show replies by date