diff --git a/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF
index 44a16d1ff4..2382eddf8d 100644
--- a/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: PDE JUnit Tests
Bundle-SymbolicName: org.eclipse.pde.ui.tests; singleton:=true
-Bundle-Version: 3.13.0.qualifier
+Bundle-Version: 3.13.100.qualifier
Bundle-ClassPath: tests.jar
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.pde.ui,
diff --git a/ui/org.eclipse.pde.ui.tests/pom.xml b/ui/org.eclipse.pde.ui.tests/pom.xml
index cef87944ff..cbdbf4a0c9 100644
--- a/ui/org.eclipse.pde.ui.tests/pom.xml
+++ b/ui/org.eclipse.pde.ui.tests/pom.xml
@@ -18,7 +18,7 @@
../../
org.eclipse.pde.ui.tests
- 3.13.0-SNAPSHOT
+ 3.13.100-SNAPSHOT
eclipse-test-plugin
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java
index 31d9b03935..2792b4f1a0 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java
@@ -172,8 +172,9 @@ private int getIntAttribute(IMarker marker, String property) {
return 0;
}
- if (value == null)
+ if (value == null) {
return 0;
+ }
return value.intValue();
}
@@ -185,8 +186,9 @@ private String getStringAttribute(IMarker marker, String property) {
value = "";
}
- if (value == null || value.equalsIgnoreCase("\"\""))
+ if (value == null || value.equalsIgnoreCase("\"\"")) {
value = "";
+ }
return value.trim();
}
@@ -197,8 +199,9 @@ private String getProperty(PropertyResourceBundle propertyBundle, String propert
} catch (Exception e) {
value = "";
}
- if (value == null || value.equalsIgnoreCase("\"\""))
+ if (value == null || value.equalsIgnoreCase("\"\"")) {
value = "";
+ }
return value.trim();
}
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/ee/EnvironmentAnalyzerDelegate.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/ee/EnvironmentAnalyzerDelegate.java
index 8eb3b68f18..be2f51c677 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/ee/EnvironmentAnalyzerDelegate.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/ee/EnvironmentAnalyzerDelegate.java
@@ -38,8 +38,9 @@ public class EnvironmentAnalyzerDelegate implements IExecutionEnvironmentAnalyze
@Override
public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
- if (!(vm instanceof IVMInstall2 vm2))
+ if (!(vm instanceof IVMInstall2 vm2)) {
return new CompatibleEnvironment[0];
+ }
ArrayList result = new ArrayList<>();
String javaVersion = vm2.getJavaVersion();
if (javaVersion != null) {
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/BundleModelTestCase.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/BundleModelTestCase.java
index 7d9b2fa372..de6837ab9b 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/BundleModelTestCase.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/BundleModelTestCase.java
@@ -50,8 +50,9 @@ protected void load(boolean addListener) {
try {
fModel = new BundleModel(fDocument, false);
fModel.load();
- if (!fModel.isLoaded() || !fModel.isValid())
+ if (!fModel.isLoaded() || !fModel.isValid()) {
fail("model cannot be loaded");
+ }
if (addListener) {
fListener = new BundleTextChangeListener(fModel.getDocument());
fModel.addModelChangedListener(fListener);
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/RequireBundleTestCase.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/RequireBundleTestCase.java
index 5b7aa466f1..cf1539af35 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/RequireBundleTestCase.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/bundle/RequireBundleTestCase.java
@@ -514,9 +514,11 @@ public void testRemoveReExport() throws Exception {
private static RequireBundleObject getBundle(RequireBundleHeader header, String id) {
RequireBundleObject[] bundles = header.getRequiredBundles();
- for (RequireBundleObject bundle : bundles)
- if (bundle.getId().equals(id))
+ for (RequireBundleObject bundle : bundles) {
+ if (bundle.getId().equals(id)) {
return bundle;
+ }
+ }
return null;
}
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/xml/XMLModelTestCase.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/xml/XMLModelTestCase.java
index ac2b39e1e6..6c982bbc4e 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/xml/XMLModelTestCase.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/xml/XMLModelTestCase.java
@@ -49,8 +49,9 @@ protected void load(boolean addListener) {
try {
fModel = new PluginModel(fDocument, true);
fModel.load();
- if (!fModel.isLoaded() || !fModel.isValid())
+ if (!fModel.isLoaded() || !fModel.isValid()) {
fail("model cannot be loaded");
+ }
if (addListener) {
fListener = new XMLTextChangeListener(fModel.getDocument());
fModel.addModelChangedListener(fListener);
@@ -68,8 +69,9 @@ protected void setXMLContents(StringBuilder body, String newline) {
sb.append(newline);
sb.append("");
sb.append(newline);
- if (body != null)
+ if (body != null) {
sb.append(body.toString());
+ }
sb.append(newline);
sb.append("");
sb.append(newline);
@@ -78,8 +80,9 @@ protected void setXMLContents(StringBuilder body, String newline) {
protected void reload() {
TextEdit[] ops = fListener.getTextOperations();
- if (ops.length == 0)
+ if (ops.length == 0) {
return;
+ }
MultiTextEdit multi = new MultiTextEdit();
multi.addChildren(ops);
try {
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/AbstractSchemaPerfTest.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/AbstractSchemaPerfTest.java
index 025b80cac6..d7a9535e9d 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/AbstractSchemaPerfTest.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/AbstractSchemaPerfTest.java
@@ -53,14 +53,17 @@ protected void setUpIterations() {
private void setUpSchemaFile() throws Exception, IOException {
Bundle bundle = FrameworkUtil.getBundle(AbstractSchemaPerfTest.class);
- if (bundle == null)
+ if (bundle == null) {
throw new Exception("ERROR: Bundle uninitialized"); //$NON-NLS-1$
+ }
URL url = bundle.getEntry(F_FILENAME);
- if (url == null)
+ if (url == null) {
throw new Exception("ERROR: URL not found: " + F_FILENAME); //$NON-NLS-1$
+ }
String path = FileLocator.resolve(url).getPath();
- if ("".equals(path)) //$NON-NLS-1$
+ if ("".equals(path)) { //$NON-NLS-1$
throw new Exception("ERROR: URL unresolved: " + F_FILENAME); //$NON-NLS-1$
+ }
fXSDFile = new File(path);
}
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/preferences/PDEPreferencesTestCase.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/preferences/PDEPreferencesTestCase.java
index 1e9728d2d2..3f4945dea8 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/preferences/PDEPreferencesTestCase.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/preferences/PDEPreferencesTestCase.java
@@ -84,8 +84,9 @@ public void testPreferenceChangeListener1(){
preferences.removePreferenceChangeListener(listener);
// Restore original value
- if (originalValue != key)
+ if (originalValue != key) {
preferences.put(key, originalValue);
+ }
}
@Test
@@ -105,8 +106,9 @@ public void testPreferenceChangeListner2(){
preferences.removePreferenceChangeListener(listener);
// Restore original value
- if (originalValue != key)
+ if (originalValue != key) {
preferences.put(key, originalValue);
+ }
}
@Test
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/project/DynamicPluginProjectReferencesTest.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/project/DynamicPluginProjectReferencesTest.java
index 78a80b319d..3225a593e0 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/project/DynamicPluginProjectReferencesTest.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/project/DynamicPluginProjectReferencesTest.java
@@ -77,8 +77,9 @@ public void testHopViaTargetPlatform_required() throws Exception {
IBuildConfiguration[] referencedBuildConfigs = coreCommandsProject
.getReferencedBuildConfigs(coreCommandsProject.getActiveBuildConfig().getName(), false);
for (IBuildConfiguration reference : referencedBuildConfigs) {
- if (reference.getProject() == osgiProject)
+ if (reference.getProject() == osgiProject) {
return;
+ }
}
Assert.fail("references should include local osgi project: " + Arrays.toString(referencedBuildConfigs));
@@ -101,8 +102,9 @@ public void testHopViaTargetPlatform_imported() throws Exception {
IBuildConfiguration[] referencedBuildConfigs = importingTargetBundle
.getReferencedBuildConfigs(importingTargetBundle.getActiveBuildConfig().getName(), false);
for (IBuildConfiguration reference : referencedBuildConfigs) {
- if (reference.getProject() == osgiProject)
+ if (reference.getProject() == osgiProject) {
return;
+ }
}
Assert.fail("references should include local osgi project: " + Arrays.toString(referencedBuildConfigs));
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewFeatureProjectTestCase.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewFeatureProjectTestCase.java
index 5c9cb12aff..019790f1bd 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewFeatureProjectTestCase.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewFeatureProjectTestCase.java
@@ -59,18 +59,21 @@ protected String getProjectName() {
}
private void createFeature(FeatureData fd, boolean patch, Object modelObject) throws Exception {
- if (fd == null)
+ if (fd == null) {
fd = DEFAULT_FEATURE_DATA;
+ }
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
IPath path = Platform.getLocation();
IRunnableWithProgress op;
- if ((patch && !(modelObject instanceof IFeatureModel)) || (!patch && modelObject != null && !(modelObject instanceof IPluginBase[])))
+ if ((patch && !(modelObject instanceof IFeatureModel)) || (!patch && modelObject != null && !(modelObject instanceof IPluginBase[]))) {
fail("Unaccepted model object passed..." + modelObject);
+ }
- if (patch)
+ if (patch) {
op = new CreateFeaturePatchOperation(project, path, fd, (IFeatureModel) modelObject, PDEPlugin.getActiveWorkbenchShell());
- else
+ } else {
op = new CreateFeatureProjectOperation(project, path, fd, (IPluginBase[]) modelObject, PDEPlugin.getActiveWorkbenchShell());
+ }
IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
progressService.runInUI(progressService, op, null);
}
@@ -89,9 +92,10 @@ public void testCreationFeatureProject() throws Exception {
@Test
public void testCreationFeaturePatch() throws Exception {
IFeatureModel[] models = PDECore.getDefault().getFeatureModelManager().getModels();
- if (models.length == 0)
+ if (models.length == 0) {
// cant test patches if no feature models exist
return;
+ }
createFeature(DEFAULT_FEATURE_DATA, true, models[0]);
verifyProjectExistence();
verifyFeatureNature();
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewSiteProjectTestCase.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewSiteProjectTestCase.java
index 900db3fcc6..7f71555b63 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewSiteProjectTestCase.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/wizards/NewSiteProjectTestCase.java
@@ -58,10 +58,11 @@ public void setUp() throws Exception {
+ "" //$NON-NLS-1$
+ ""; //$NON-NLS-1$
ByteArrayInputStream source = new ByteArrayInputStream(content.getBytes(StandardCharsets.US_ASCII));
- if (file.exists())
+ if (file.exists()) {
file.setContents(source, true, false, new NullProgressMonitor());
- else
+ } else {
file.create(source, true, new NullProgressMonitor());
+ }
project.delete(false, true, new NullProgressMonitor());
}
}