Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-09-26 14:48:57 +0000
committerAlexander Kurtakov2016-09-26 14:48:57 +0000
commit923a0fc45e4e8ad71e6d812fe6a5df50ad17acaa (patch)
treeea556df8c53cb4ffca5a1956af8668d4e1bbd462
parent959f074966060b5cc435e02f7600c028e7ec3e99 (diff)
downloadeclipse.platform.releng-923a0fc45e4e8ad71e6d812fe6a5df50ad17acaa.tar.gz
eclipse.platform.releng-923a0fc45e4e8ad71e6d812fe6a5df50ad17acaa.tar.xz
eclipse.platform.releng-923a0fc45e4e8ad71e6d812fe6a5df50ad17acaa.zip
Bug 501707 - [Tests] Reduce warnings in org.eclipse.test.performance
* Suppress some warnings. * More generifications. Change-Id: I8663597be8d4a1c229ab6f7e9da6d0c2d62156b0 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/DB.java1
-rw-r--r--bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Scenario.java4
-rw-r--r--bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Variations.java4
-rw-r--r--bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/tests/TestPerformanceMeter.java5
4 files changed, 9 insertions, 5 deletions
diff --git a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/DB.java b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/DB.java
index e74ad4cb..bd8dd613 100644
--- a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/DB.java
+++ b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/DB.java
@@ -720,6 +720,7 @@ public class DB {
if (DEBUG) {
System.out.print(" - query summaries from DB for scenario pattern '" + scenarioPattern + "'..."); //$NON-NLS-1$ //$NON-NLS-2$
}
+ @SuppressWarnings("resource")
ResultSet result = null;
try {
final List<SummaryEntry> fingerprints = new ArrayList<>();
diff --git a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Scenario.java b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Scenario.java
index 8076ece4..f9f9172f 100644
--- a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Scenario.java
+++ b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Scenario.java
@@ -64,9 +64,9 @@ public class Scenario {
}
String[] result = new String[names.length];
for (int i = 0; i < names.length; i++) {
- Map messages = fMessages.get(names[i]);
+ Map<String, String> messages = fMessages.get(names[i]);
if (messages != null)
- result[i] = (String) messages.get(scenarioId);
+ result[i] = messages.get(scenarioId);
}
return result;
}
diff --git a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Variations.java b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Variations.java
index 13ce59d5..18d79fe6 100644
--- a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Variations.java
+++ b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/db/Variations.java
@@ -1,5 +1,6 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
@@ -100,6 +101,7 @@ public class Variations extends Properties {
/*
* TODO: we need to escape '=' and ';' characters in key/values.
*/
+ @SuppressWarnings({ "rawtypes", "unchecked" })
private static String toDB(Properties keyValues, boolean asQuery) {
Set set = keyValues.keySet();
String[] keys = (String[]) set.toArray(new String[set.size()]);
diff --git a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/tests/TestPerformanceMeter.java b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/tests/TestPerformanceMeter.java
index 5fc13c30..39c3a199 100644
--- a/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/tests/TestPerformanceMeter.java
+++ b/bundles/org.eclipse.test.performance/src/org/eclipse/test/internal/performance/tests/TestPerformanceMeter.java
@@ -1,5 +1,6 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
@@ -52,7 +53,7 @@ class TestPerformanceMeter extends InternalPerformanceMeter {
@Override
public Sample getSample() {
if (fDataPoints != null)
- return new Sample(getScenarioName(), fStartTime, new HashMap(),
+ return new Sample(getScenarioName(), fStartTime, new HashMap<>(),
fDataPoints.toArray(new DataPoint[fDataPoints.size()]));
return null;
}

Back to the top