Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-08-25 11:33:24 -0400
committerKarsten Thoms2019-09-16 17:07:17 -0400
commitbb023c36e3964193edf7f82e8fee3478f33b30cc (patch)
tree033ee446d5527414458f70c6c9b9d804729f43a0
parent2db141f0d5c2c388b7557c495680d48c3d977854 (diff)
downloadeclipse.platform.team-bb023c36e3964193edf7f82e8fee3478f33b30cc.tar.gz
eclipse.platform.team-bb023c36e3964193edf7f82e8fee3478f33b30cc.tar.xz
eclipse.platform.team-bb023c36e3964193edf7f82e8fee3478f33b30cc.zip
Remove unnecessary type specificationsI20190916-1800
Since Java 7 the diamond operator can be used instead of explicit type parameters. Change-Id: I2a5017574b71a0aa5125cf81efa784b3a3a05735 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java6
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java10
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java2
9 files changed, 16 insertions, 16 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
index b9b1dd980..4294fa055 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
@@ -421,7 +421,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
*/
public static IConnectionMethod[] getPluggedInConnectionMethods() {
if(pluggedInConnectionMethods==null) {
- List<Object> connectionMethods = new ArrayList<Object>();
+ List<Object> connectionMethods = new ArrayList<>();
if (STANDALONE_MODE) {
connectionMethods.add(new PServerConnectionMethod());
@@ -641,7 +641,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
ICVSRemoteResource[] resources = root.members(progress);
// There is the off chance that there is a file in the root of the repository.
// This is not supported by cvs so we need to make sure there are no files
- List<ICVSRemoteResource> folders = new ArrayList<ICVSRemoteResource>(resources.length);
+ List<ICVSRemoteResource> folders = new ArrayList<>(resources.length);
for (ICVSRemoteResource remoteResource : resources) {
if (remoteResource.isContainer()) {
folders.add(remoteResource);
@@ -1085,7 +1085,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
CVS_RSH_PARAMETERS = stringReplace(CVS_RSH_PARAMETERS, PORT_VARIABLE, Integer.valueOf(port).toString());
// Build the command list to be sent to the OS.
- List<String> commands = new ArrayList<String>();
+ List<String> commands = new ArrayList<>();
commands.add(CVS_RSH);
StringTokenizer tokenizer = new StringTokenizer(CVS_RSH_PARAMETERS);
while (tokenizer.hasMoreTokens()) {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
index 97b65a345..147fb712c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
@@ -96,9 +96,9 @@ public class RemoteFolderTreeBuilder {
this.repository = repository;
this.root = root;
this.tag = tag;
- this.fileDeltas = new HashMap<String, Map>();
- this.changedFiles = new ArrayList<String>();
- this.remoteFolderTable = new HashMap<String, RemoteFolderTree>();
+ this.fileDeltas = new HashMap<>();
+ this.changedFiles = new ArrayList<>();
+ this.remoteFolderTable = new HashMap<>();
// Build the local options
List<LocalOption> localOptions = new ArrayList<>();
@@ -563,7 +563,7 @@ public class RemoteFolderTreeBuilder {
// Prune any empty child folders
if (isPruneEmptyDirectories() && !emptyChildren.isEmpty()) {
- List<ICVSRemoteResource> newChildren = new ArrayList<ICVSRemoteResource>();
+ List<ICVSRemoteResource> newChildren = new ArrayList<>();
newChildren.addAll(Arrays.asList(remote.getChildren()));
newChildren.removeAll(emptyChildren);
remote.setChildren(newChildren.toArray(new ICVSRemoteResource[newChildren.size()]));
@@ -709,7 +709,7 @@ public class RemoteFolderTreeBuilder {
private void fetchFileRevisions(Session session, String[] fileNames, final IProgressMonitor monitor) throws CVSException {
// Create a listener for receiving the revision info
- final List<CVSException> exceptions = new ArrayList<CVSException>();
+ final List<CVSException> exceptions = new ArrayList<>();
IStatusListener listener = new IStatusListener() {
public void fileStatus(ICVSFolder root, String path, String remoteRevision) {
try {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
index 37fb05a7b..818740afc 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
@@ -248,7 +248,7 @@ public abstract class DiffOperation extends SingleCommandOperation {
}, recurse);
}
- final SortedSet<Object> allFiles = new TreeSet<Object>(COMPARATOR);
+ final SortedSet<Object> allFiles = new TreeSet<>(COMPARATOR);
allFiles.addAll(existingFiles);
allFiles.addAll(newFiles);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java
index 8d5bb6330..9a4e37e7d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java
@@ -102,8 +102,8 @@ public class AddWizard extends ResizableWizard {
@Override
public void addPages() {
- final Collection<String> names= new HashSet<String>();
- final Collection<String> extensions= new HashSet<String>();
+ final Collection<String> names= new HashSet<>();
+ final Collection<String> extensions= new HashSet<>();
getUnknownNamesAndExtension(unknowns, names, extensions);
if (names.size() + extensions.size() > 0) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index 978e134ec..8848cd264 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -88,7 +88,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
private WorkspaceTeamStateProvider provider;
- private Map<String, TeamStateProvider> decoratedStateProviders = new HashMap<String, TeamStateProvider>();
+ private Map<String, TeamStateProvider> decoratedStateProviders = new HashMap<>();
// manages synchronize participants
private SynchronizeManager synchronizeManager;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
index 361c256c0..c7f1839c5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
@@ -177,7 +177,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
try {
if (resource.getType() != IResource.FILE) {
IResource[] members = members(((IContainer)resource));
- List<ResourceTraversalElement> result = new ArrayList<ResourceTraversalElement>();
+ List<ResourceTraversalElement> result = new ArrayList<>();
for (IResource child : members) {
if ((includeFolders || child.getType() == IResource.FILE)
&& isIncludedInFilter(child, traversal))
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
index e6d3b622a..8cc694e54 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
@@ -284,7 +284,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
private IAction[] createActions() {
NavigationHistoryEntry[] entries = getDropDownEntries();
- List<NavigationHistoryEntryAction> actions = new ArrayList<NavigationHistoryEntryAction>();
+ List<NavigationHistoryEntryAction> actions = new ArrayList<>();
for (NavigationHistoryEntry navigationHistoryEntry : entries) {
actions.add(new NavigationHistoryEntryAction(navigationHistoryEntry));
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
index 24fcddc09..072339c1b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
@@ -878,7 +878,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
//Everything before after week is previous
tempCategories[3] = new DateHistoryCategory(TeamUIMessages.HistoryPage_Previous, null, monthCal);
- ArrayList<AbstractHistoryCategory> finalCategories = new ArrayList<AbstractHistoryCategory>();
+ ArrayList<AbstractHistoryCategory> finalCategories = new ArrayList<>();
for (DateHistoryCategory tempCategory : tempCategories) {
tempCategory.collectFileRevisions(revisions, false);
if (tempCategory.hasRevisions()) {
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java
index 576be08e4..4cfb3d8af 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java
@@ -82,7 +82,7 @@ public class EclipseCVSClient implements ICVSClient {
GlobalOption[] cvsGlobalOptions = globals.toArray(new GlobalOption[globals.size()]);
// get local options
- List<CustomLocalOption> locals = new ArrayList<CustomLocalOption>();
+ List<CustomLocalOption> locals = new ArrayList<>();
for (int i = 0; i < localOptions.length; i++) {
String option = localOptions[i];
String argument = null;

Back to the top