Author: vrubezhny
Date: 2010-11-19 08:10:26 -0500 (Fri, 19 Nov 2010)
New Revision: 26761
Modified:
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java
Log:
JBIDE-7576
testSeamELContentAssistJbide1676 failure
An additional check is added to prevent NullPointerException appearing within test setUp()
method.
Modified:
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java 2010-11-19
13:07:12 UTC (rev 26760)
+++
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java 2010-11-19
13:10:26 UTC (rev 26761)
@@ -19,7 +19,6 @@
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
@@ -40,7 +39,6 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.IOverwriteQuery;
-import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
import org.eclipse.ui.wizards.datatransfer.ImportOperation;
import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
import org.jboss.tools.tests.ImportProvider;
@@ -189,13 +187,17 @@
*/
public static IProject importProject(String bundleName, String templatePath,
IProgressMonitor monitor) throws IOException, CoreException,
InvocationTargetException, InterruptedException {
- // TODO Auto-generated method stub
- return importProject(Platform.getBundle(bundleName), templatePath, monitor==null?new
NullProgressMonitor():monitor);
+ Bundle bundle = Platform.getBundle(bundleName);
+ if (bundle == null)
+ return null;
+ return importProject(bundle, templatePath, monitor==null?new
NullProgressMonitor():monitor);
}
public static IProject importProject(String bundleName, String templatePath) throws
IOException, CoreException, InvocationTargetException, InterruptedException {
- // TODO Auto-generated method stub
- return importProject(Platform.getBundle(bundleName), templatePath, null);
+ Bundle bundle = Platform.getBundle(bundleName);
+ if (bundle == null)
+ return null;
+ return importProject(bundle, templatePath, null);
}
public static void deleteProject(String projectName) throws CoreException {
Show replies by date