Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:55:36 +0000
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /testsrunner/org.eclipse.cdt.testsrunner
parent8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff)
downloadorg.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.gz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.xz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.zip
Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Remove redundant type arguments and completing the wizard Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
Diffstat (limited to 'testsrunner/org.eclipse.cdt.testsrunner')
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/TestsRunnerPlugin.java2
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/launcher/TestsRunnerProvidersManager.java2
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestCase.java2
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestModelManager.java6
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestSuite.java2
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSession.java2
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSessionsManager.java4
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/MessagesViewer.java6
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestPathUtils.java4
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestsHierarchyViewer.java6
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/UIUpdater.java6
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/actions/HistoryDropDownAction.java4
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java2
13 files changed, 24 insertions, 24 deletions
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/TestsRunnerPlugin.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/TestsRunnerPlugin.java
index 51c587818da..c9d7166c1db 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/TestsRunnerPlugin.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/TestsRunnerPlugin.java
@@ -210,7 +210,7 @@ public class TestsRunnerPlugin extends AbstractUIPlugin {
* @param mode launch mode
*/
private void setDefaultLaunchDelegate(ILaunchConfigurationType cfgType, String delegateId, String mode) {
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
try {
if (cfgType.getPreferredDelegate(modes) == null) {
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/launcher/TestsRunnerProvidersManager.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/launcher/TestsRunnerProvidersManager.java
index 28d425805fa..254223d6a1f 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/launcher/TestsRunnerProvidersManager.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/launcher/TestsRunnerProvidersManager.java
@@ -42,7 +42,7 @@ public class TestsRunnerProvidersManager {
public TestsRunnerProviderInfo[] getTestsRunnersProviderInfo() {
if (testsRunnerProviders == null) {
// Initialize tests runners info
- List<TestsRunnerProviderInfo> testsRunnerProvidersList = new ArrayList<TestsRunnerProviderInfo>();
+ List<TestsRunnerProviderInfo> testsRunnerProvidersList = new ArrayList<>();
for (IConfigurationElement element : Platform.getExtensionRegistry()
.getConfigurationElementsFor(TESTS_RUNNER_EXTENSION_POINT_ID)) {
testsRunnerProvidersList.add(new TestsRunnerProviderInfo(element));
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestCase.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestCase.java
index 4ee08dbe835..836a3866f19 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestCase.java
@@ -34,7 +34,7 @@ public class TestCase extends TestItem implements ITestCase {
* The messages that were generated by testing framework during test
* running.
*/
- private List<TestMessage> testMessages = new ArrayList<TestMessage>();
+ private List<TestMessage> testMessages = new ArrayList<>();
public TestCase(String name, TestSuite parent) {
super(name, parent);
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestModelManager.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestModelManager.java
index 998fe870b00..0bd655a7486 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestModelManager.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestModelManager.java
@@ -47,7 +47,7 @@ public class TestModelManager implements ITestModelUpdater, ITestModelAccessor {
public static final String ROOT_TEST_SUITE_NAME = "<root>"; //$NON-NLS-1$
/** Stack of the currently entered (and not existed) test suites. */
- private Stack<TestSuite> testSuitesStack = new Stack<TestSuite>();
+ private Stack<TestSuite> testSuitesStack = new Stack<>();
/**
* Currently running test case. There are no nested test cases, so the
@@ -64,10 +64,10 @@ public class TestModelManager implements ITestModelUpdater, ITestModelAccessor {
* testing is finished cause they are considered as renamed or removed).
* @note Test suite insert position is important for insertion algorithm.
*/
- private Map<TestItem, Integer> testSuitesIndex = new HashMap<TestItem, Integer>();
+ private Map<TestItem, Integer> testSuitesIndex = new HashMap<>();
/** Listeners collection. */
- private List<ITestingSessionListener> listeners = new ArrayList<ITestingSessionListener>();
+ private List<ITestingSessionListener> listeners = new ArrayList<>();
/** Flag stores whether test execution time should be measured for the session. */
private boolean timeMeasurement = false;
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestSuite.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestSuite.java
index c8a2911ee57..66d0b494e65 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestSuite.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestSuite.java
@@ -29,7 +29,7 @@ public class TestSuite extends TestItem implements ITestSuite {
*
* @note Children order is important.
*/
- private List<TestItem> children = new ArrayList<TestItem>();
+ private List<TestItem> children = new ArrayList<>();
public TestSuite(String name, TestSuite parent) {
super(name, parent);
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSession.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSession.java
index ec2f37be2e1..d9ce77fd76a 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSession.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSession.java
@@ -72,7 +72,7 @@ public class TestingSession implements ITestingSession {
* statistics without model scanning.
*
*/
- private Map<ITestItem.Status, Integer> statusCounters = new EnumMap<ITestItem.Status, Integer>(
+ private Map<ITestItem.Status, Integer> statusCounters = new EnumMap<>(
ITestItem.Status.class);
/**
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSessionsManager.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSessionsManager.java
index 1bbe0bc6806..0a1fdb5cc90 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSessionsManager.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/model/TestingSessionsManager.java
@@ -36,13 +36,13 @@ public class TestingSessionsManager implements ILaunchConfigurationListener {
private TestsRunnerProvidersManager testsRunnersManager;
/** Testing sessions history list (the first is the newest). */
- private LinkedList<TestingSession> sessions = new LinkedList<TestingSession>();
+ private LinkedList<TestingSession> sessions = new LinkedList<>();
/** Currently active testing session. */
private TestingSession activeSession;
/** Listeners collection. */
- private List<ITestingSessionsManagerListener> listeners = new ArrayList<ITestingSessionsManagerListener>();
+ private List<ITestingSessionsManagerListener> listeners = new ArrayList<>();
/** The size limit of the testing sessions history. */
private int historySizeLimit = 10;
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/MessagesViewer.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/MessagesViewer.java
index 791591da6a4..aaea323aa37 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/MessagesViewer.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/MessagesViewer.java
@@ -199,7 +199,7 @@ public class MessagesViewer {
* @return set to store the test messages
*/
private TreeSet<ITestMessage> createMessagesSet() {
- return new TreeSet<ITestMessage>(new Comparator<ITestMessage>() {
+ return new TreeSet<>(new Comparator<ITestMessage>() {
@Override
public int compare(ITestMessage message1, ITestMessage message2) {
@@ -248,7 +248,7 @@ public class MessagesViewer {
* @return list to store the test messages
*/
private ArrayList<ITestMessage> createMessagesList() {
- return new ArrayList<ITestMessage>();
+ return new ArrayList<>();
}
/**
@@ -358,7 +358,7 @@ public class MessagesViewer {
private boolean showFileNameOnly = false;
/** The set of message level to show the messages with. */
- private Set<ITestMessage.Level> acceptedMessageLevels = new HashSet<ITestMessage.Level>();
+ private Set<ITestMessage.Level> acceptedMessageLevels = new HashSet<>();
/** Specifies whether test messages ordering is on or off. */
private boolean orderingMode = false;
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestPathUtils.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestPathUtils.java
index 8642f8f2982..ed3f024709a 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestPathUtils.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestPathUtils.java
@@ -43,7 +43,7 @@ public class TestPathUtils {
*/
public static String getTestItemPath(ITestItem testItem) {
StringBuilder itemPath = new StringBuilder();
- List<ITestItem> parentItems = new ArrayList<ITestItem>();
+ List<ITestItem> parentItems = new ArrayList<>();
while (testItem != null) {
parentItems.add(testItem);
testItem = testItem.getParent();
@@ -85,7 +85,7 @@ public class TestPathUtils {
*/
public static String[] packTestPaths(ITestItem[] testItems) {
String[] result = new String[testItems.length];
- List<String> testPath = new ArrayList<String>();
+ List<String> testPath = new ArrayList<>();
for (int itemIdx = 0; itemIdx < testItems.length; itemIdx++) {
// Collect test path parts (in reverse order)
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestsHierarchyViewer.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestsHierarchyViewer.java
index 2177dc2e740..c00e4783920 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestsHierarchyViewer.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/TestsHierarchyViewer.java
@@ -75,7 +75,7 @@ public class TestsHierarchyViewer {
*/
private class TestCasesCollector implements IModelVisitor {
- public List<ITestCase> testCases = new ArrayList<ITestCase>();
+ public List<ITestCase> testCases = new ArrayList<>();
@Override
public void visit(ITestCase testCase) {
@@ -144,7 +144,7 @@ public class TestsHierarchyViewer {
private class TestLabelProvider extends LabelProvider implements IStyledLabelProvider {
/** Images for the test cases with the different statuses. */
- private Map<ITestItem.Status, Image> testCaseImages = new HashMap<ITestItem.Status, Image>();
+ private Map<ITestItem.Status, Image> testCaseImages = new HashMap<>();
{
testCaseImages.put(ITestItem.Status.NotRun, TestsRunnerPlugin.createAutoImage("obj16/test_notrun.gif")); //$NON-NLS-1$
testCaseImages.put(ITestItem.Status.Skipped, TestsRunnerPlugin.createAutoImage("obj16/test_skipped.gif")); //$NON-NLS-1$
@@ -157,7 +157,7 @@ public class TestsHierarchyViewer {
private Image testCaseRunImage = TestsRunnerPlugin.createAutoImage("obj16/test_run.gif"); //$NON-NLS-1$
/** Images for the test suites with the different statuses. */
- private Map<ITestItem.Status, Image> testSuiteImages = new HashMap<ITestItem.Status, Image>();
+ private Map<ITestItem.Status, Image> testSuiteImages = new HashMap<>();
{
// NOTE: There is no skipped-icon for test suite, but it seems it is not a problem
testSuiteImages.put(ITestItem.Status.NotRun, TestsRunnerPlugin.createAutoImage("obj16/tsuite_notrun.gif")); //$NON-NLS-1$
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/UIUpdater.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/UIUpdater.java
index 3a83152d162..ec4516de776 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/UIUpdater.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/UIUpdater.java
@@ -102,19 +102,19 @@ public class UIUpdater {
* Set of tree objects on which <code>refresh()</code> should be called
* during the next UI update.
*/
- private Set<Object> treeItemsToRefresh = new HashSet<Object>();
+ private Set<Object> treeItemsToRefresh = new HashSet<>();
/**
* Set of tree objects on which <code>update()</code> should be called
* during the next UI update.
*/
- private Set<Object> treeItemsToUpdate = new HashSet<Object>();
+ private Set<Object> treeItemsToUpdate = new HashSet<>();
/** Tree object that should be revealed during the next UI update. */
private Object treeItemToReveal;
/** Map of tree objects that should be expanded or collapsed to their new states. */
- private Map<Object, Boolean> treeItemsToExpand = new LinkedHashMap<Object, Boolean>();
+ private Map<Object, Boolean> treeItemsToExpand = new LinkedHashMap<>();
UIChangesCache() {
resetChanges();
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/actions/HistoryDropDownAction.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/actions/HistoryDropDownAction.java
index 620604e7e15..393ce9e367a 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/actions/HistoryDropDownAction.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/actions/HistoryDropDownAction.java
@@ -122,7 +122,7 @@ public class HistoryDropDownAction extends Action {
String[] buttonLabels = new String[] { ActionsMessages.HistoryAction_dialog_button_remove,
ActionsMessages.HistoryAction_dialog_button_remove_all };
LabelProvider labelProvider = new TestRunLabelProvider();
- historyList = new ListDialogField<ITestingSession>(adapter, buttonLabels, labelProvider);
+ historyList = new ListDialogField<>(adapter, buttonLabels, labelProvider);
historyList.setLabelText(ActionsMessages.HistoryAction_dialog_list_title);
historyList.setElements(testingSessionsManager.getSessions());
@@ -318,7 +318,7 @@ public class HistoryDropDownAction extends Action {
@Override
public void run() {
- List<ITestingSession> remainingSessions = new ArrayList<ITestingSession>();
+ List<ITestingSession> remainingSessions = new ArrayList<>();
for (ITestingSession testingSession : testingSessionsManager.getSessions()) {
if (!testingSession.isFinished()) {
remainingSessions.add(testingSession);
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java
index efd2be596be..dfd80e78f5b 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java
@@ -53,7 +53,7 @@ import org.eclipse.ui.PartInitException;
public abstract class BaseTestsLaunchDelegate extends LaunchConfigurationDelegate {
/** Stores the changes made to the launch configuration. */
- private Map<String, String> changesToLaunchConfiguration = new HashMap<String, String>();
+ private Map<String, String> changesToLaunchConfiguration = new HashMap<>();
@Override
public ILaunch getLaunch(ILaunchConfiguration config, String mode) throws CoreException {

Back to the top