Author: max.andersen(a)jboss.com
Date: 2012-06-01 16:53:04 -0400 (Fri, 01 Jun 2012)
New Revision: 41644
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-12079 actually report an error without NPE when magic deployments folder does not
exist
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
---
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-06-01
18:12:58 UTC (rev 41643)
+++
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-06-01
20:53:04 UTC (rev 41644)
@@ -66,9 +66,17 @@
String destinationFolder =
ExpressServerUtils.getExpressDeployFolder(behaviour.getServer());
IContainer destFolder = "".equals(destinationFolder) ? magicProject :
(IContainer)magicProject.findMember(new Path(destinationFolder));
if( destFolder == null || !destFolder.isAccessible()) {
+ StringBuffer missingPath = new StringBuffer("");
+ if(destFolder==null) {
+ missingPath.append(magicProject.getName());
+ missingPath.append("/");
+ missingPath.append(destinationFolder);
+ } else {
+ missingPath.append(destFolder.getName());
+ }
throw new CoreException(new Status(IStatus.ERROR,
OpenShiftUIActivator.PLUGIN_ID,
- NLS.bind(ExpressMessages.publishFailMissingFolder, behaviour.getServer().getName(),
destFolder.getProjectRelativePath())));
+ NLS.bind(ExpressMessages.publishFailMissingFolder, behaviour.getServer().getName(),
missingPath)));
}
}
Show replies by date