Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2019-12-28 11:21:33 +0000
committerMichael Keppler2019-12-28 11:21:33 +0000
commit74735166e9886f51705e7ca13abfb96eccc039b5 (patch)
tree73b2fce37b263725d61a3c48a194462f1ab02caf
parent32d478d9c89f7ad230dd64ad4c2e594140ca176a (diff)
downloadegit-74735166e9886f51705e7ca13abfb96eccc039b5.tar.gz
egit-74735166e9886f51705e7ca13abfb96eccc039b5.tar.xz
egit-74735166e9886f51705e7ca13abfb96eccc039b5.zip
Remove redundant type information
Execute only the cleanup "Remove redundant type information" on the egit projects. The number of Java error/warning markers is the same before and after this change. The cleanup preference was already enabled on all projects, but probably we did not execute the cleanup when enabling it. Change-Id: I638e47b1cb4826adb3843dc143e84a3a110eb4c7 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java4
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContextTest.java2
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java2
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitResourceDeltaTestHelper.java2
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/HistoryTest.java8
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleResourceMapping.java2
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java2
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CommitOperationTest.java8
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java6
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java6
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/rebase/RebaseInteractivePlanTest.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/internal/gerrit/GerritUtil.java4
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/GitResourceDeltaVisitor.java4
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffUpdateJob.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ExceptionCollector.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeleteBranchOperation.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeletePathsOperation.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationResult.java4
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationSpecification.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/UntrackOperation.java4
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteFolder.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java2
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java2
-rw-r--r--org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/FeatureListOperation.java2
-rw-r--r--org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/CommitHyperlinkDetector.java2
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java6
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/LinkedResourcesTest.java2
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/synchronize/AbstractSynchronizeViewTest.java2
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/TestRepositoryServerProvider.java2
29 files changed, 46 insertions, 46 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java
index b981578fa..ce5638786 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java
@@ -289,7 +289,7 @@ public class GitResourceVariantTreeTest extends GitTestCase {
new NullProgressMonitor());
Set<IResource> includedResource = collectResources(mappings);
- Set<IResource> expectedIncludedResources = new HashSet<IResource>();
+ Set<IResource> expectedIncludedResources = new HashSet<>();
expectedIncludedResources.add(iModifiedFile);
expectedIncludedResources.add(iUnchangedFile);
expectedIncludedResources.add(iRemovedFile);
@@ -362,7 +362,7 @@ public class GitResourceVariantTreeTest extends GitTestCase {
private static Set<IResource> collectResources(ResourceMapping[] mappings)
throws CoreException {
- final Set<IResource> resources = new HashSet<IResource>();
+ final Set<IResource> resources = new HashSet<>();
ResourceMappingContext context = ResourceMappingContext.LOCAL_CONTEXT;
for (ResourceMapping mapping : mappings) {
ResourceTraversal[] traversals = mapping.getTraversals(context,
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContextTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContextTest.java
index ba2fd490f..6efd763aa 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContextTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberMergeContextTest.java
@@ -333,7 +333,7 @@ public class GitSubscriberMergeContextTest extends ModelTestCase {
assertTrue(mergeStatus instanceof IMergeStatus);
assertEquals(2,
((IMergeStatus) mergeStatus).getConflictingMappings().length);
- Set<IFile> conflictingFiles = new LinkedHashSet<IFile>();
+ Set<IFile> conflictingFiles = new LinkedHashSet<>();
for (ResourceMapping conflictingMapping : ((IMergeStatus) mergeStatus)
.getConflictingMappings()) {
assertTrue(conflictingMapping instanceof SampleResourceMapping
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java
index 1c03438be..46679ff4f 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java
@@ -55,7 +55,7 @@ public class GitProjectSetCapabilityTest {
private GitProjectSetCapability capability;
- private List<IProject> createdProjects = new ArrayList<IProject>();
+ private List<IProject> createdProjects = new ArrayList<>();
private List<File> pathsToClean = new ArrayList<>();
protected final static TestUtils testUtils = new TestUtils();
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitResourceDeltaTestHelper.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitResourceDeltaTestHelper.java
index d0bc9c54e..1d635560f 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitResourceDeltaTestHelper.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitResourceDeltaTestHelper.java
@@ -60,7 +60,7 @@ public class GitResourceDeltaTestHelper {
public GitResourceDeltaTestHelper(Repository repository,
boolean ignoreTeamPrivateMember) {
this.repository = repository;
- this.changedResources = new HashSet<IResource>();
+ this.changedResources = new HashSet<>();
this.ignoreTeamPrivateMember = ignoreTeamPrivateMember;
}
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/HistoryTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/HistoryTest.java
index 5525cde88..c83edfa91 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/HistoryTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/HistoryTest.java
@@ -51,7 +51,7 @@ public class HistoryTest extends GitTestCase {
private IFile iFile2;
- private final List<RevCommit> commits = new ArrayList<RevCommit>();
+ private final List<RevCommit> commits = new ArrayList<>();
private RevCommit masterCommit1;
@@ -142,7 +142,7 @@ public class HistoryTest extends GitTestCase {
final IFileRevision[] revisions = history.getFileRevisions();
assertEquals(expectedHistory.size(), revisions.length);
- final List<RevCommit> commitList = new ArrayList<RevCommit>(
+ final List<RevCommit> commitList = new ArrayList<>(
expectedHistory);
assertMatchingRevisions(Arrays.asList(revisions), commitList);
}
@@ -285,7 +285,7 @@ public class HistoryTest extends GitTestCase {
final IFileRevision[] masterCommit1Children = history
.getTargets(masterFileRevision1);
assertEquals(2, masterCommit1Children.length);
- final List<RevCommit> expected = new ArrayList<RevCommit>(
+ final List<RevCommit> expected = new ArrayList<>(
Arrays.asList(masterCommit3, branchCommit1));
assertMatchingRevisions(Arrays.asList(masterCommit1Children), expected);
@@ -382,7 +382,7 @@ public class HistoryTest extends GitTestCase {
* (branching point) in file2's history is branchCommit2.
*/
IFileRevision[] children = history.getTargets(baseRevision);
- List<RevCommit> expectedChildren = new ArrayList<RevCommit>(
+ List<RevCommit> expectedChildren = new ArrayList<>(
Arrays.asList(masterCommit3, branchCommit2));
assertEquals(expectedChildren.size(), children.length);
assertMatchingRevisions(Arrays.asList(children), expectedChildren);
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleResourceMapping.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleResourceMapping.java
index 1fe9a8e0f..ea5387c37 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleResourceMapping.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleResourceMapping.java
@@ -51,7 +51,7 @@ public class SampleResourceMapping extends ResourceMapping {
public ResourceTraversal[] getTraversals(
ResourceMappingContext context, IProgressMonitor monitor)
throws CoreException {
- Set<IFile> sampleSiblings = new LinkedHashSet<IFile>();
+ Set<IFile> sampleSiblings = new LinkedHashSet<>();
for (IResource res : file.getParent().members()) {
if (res instanceof IFile && SampleModelProvider.SAMPLE_FILE_EXTENSION.equals(res.getFileExtension())) {
sampleSiblings.add((IFile) res);
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java
index 5178a3153..ac9e2e33d 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
public class AddOperationTest extends GitTestCase {
- private List<IResource> resources = new ArrayList<IResource>();
+ private List<IResource> resources = new ArrayList<>();
TestRepository testRepository;
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CommitOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CommitOperationTest.java
index 0a1b629f1..3372a399c 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CommitOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CommitOperationTest.java
@@ -42,9 +42,9 @@ import org.junit.Test;
public class CommitOperationTest extends GitTestCase {
- private static List<IFile> EMPTY_FILE_LIST = new ArrayList<IFile>();
+ private static List<IFile> EMPTY_FILE_LIST = new ArrayList<>();
- private List<IResource> resources = new ArrayList<IResource>();
+ private List<IResource> resources = new ArrayList<>();
TestRepository testRepository;
@@ -199,9 +199,9 @@ public class CommitOperationTest extends GitTestCase {
}
project.getProject().getFolder("sub2").delete(IResource.FORCE, null);
IFile[] filesToCommit = { project.getProject().getFile("sub2/b.txt") };
- ArrayList<IFile> notIndexed = new ArrayList<IFile>();
+ ArrayList<IFile> notIndexed = new ArrayList<>();
notIndexed.add(filesToCommit[0]);
- ArrayList<IFile> notTracked = new ArrayList<IFile>();
+ ArrayList<IFile> notTracked = new ArrayList<>();
commitOperation = new CommitOperation(filesToCommit, notTracked, TestUtils.AUTHOR, TestUtils.COMMITTER, "second commit");
commitOperation.setCommitAll(false);
commitOperation.execute(null);
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java
index 2361b57b5..f857b9a15 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java
@@ -131,7 +131,7 @@ public class PushOperationTest extends DualRepositoryTestCase {
// let's add a new file to the project shared with repository1
IProject proj = importProject(repository1, projectName);
- ArrayList<IFile> files = new ArrayList<IFile>();
+ ArrayList<IFile> files = new ArrayList<>();
IFile newFile = testUtils.addFileToProject(proj, "folder2/file2.txt",
"New file");
files.add(newFile);
@@ -266,7 +266,7 @@ public class PushOperationTest extends DualRepositoryTestCase {
// the remote is repo2
URIish remote = repository2.getUri();
// update master upon master
- List<RemoteRefUpdate> refUpdates = new ArrayList<RemoteRefUpdate>();
+ List<RemoteRefUpdate> refUpdates = new ArrayList<>();
RemoteRefUpdate update = new RemoteRefUpdate(repository1
.getRepository(), "HEAD", "refs/heads/test", false, null, null);
refUpdates.add(update);
@@ -328,7 +328,7 @@ public class PushOperationTest extends DualRepositoryTestCase {
URIish remote = new URIish("file:///"
+ repository2.getRepository().getDirectory().toString());
// update master upon master
- List<RemoteRefUpdate> refUpdates = new ArrayList<RemoteRefUpdate>();
+ List<RemoteRefUpdate> refUpdates = new ArrayList<>();
RemoteRefUpdate update = new RemoteRefUpdate(repository1
.getRepository(), "HEAD", "refs/heads/test", false, null, null);
refUpdates.add(update);
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java
index 57712b857..701897dd3 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java
@@ -69,7 +69,7 @@ public class TrackUntrackOperationTest extends DualRepositoryTestCase {
@Test
public void testTrackFiles() throws Exception {
- final ArrayList<IFile> files = new ArrayList<IFile>();
+ final ArrayList<IFile> files = new ArrayList<>();
project.accept(new IResourceVisitor() {
@@ -112,10 +112,10 @@ public class TrackUntrackOperationTest extends DualRepositoryTestCase {
@Test
public void testTrackProject() throws Exception {
- final ArrayList<IContainer> containers = new ArrayList<IContainer>();
+ final ArrayList<IContainer> containers = new ArrayList<>();
containers.add(project);
- final ArrayList<IFile> files = new ArrayList<IFile>();
+ final ArrayList<IFile> files = new ArrayList<>();
project.accept(new IResourceVisitor() {
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/rebase/RebaseInteractivePlanTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/rebase/RebaseInteractivePlanTest.java
index 5560ab679..cea6b5765 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/rebase/RebaseInteractivePlanTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/rebase/RebaseInteractivePlanTest.java
@@ -55,7 +55,7 @@ public class RebaseInteractivePlanTest extends GitTestCase {
testRepository = new TestRepository(gitDir);
testRepository.connect(project.getProject());
plan = RebaseInteractivePlan.getPlan(testRepository.getRepository());
- toDoElements = new ArrayList<PlanElement>();
+ toDoElements = new ArrayList<>();
moveHelper = new RebaseInteractivePlan.MoveHelper(toDoElements, plan);
}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/gerrit/GerritUtil.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/gerrit/GerritUtil.java
index d31021df9..48f88e1fa 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/gerrit/GerritUtil.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/gerrit/GerritUtil.java
@@ -106,7 +106,7 @@ public class GerritUtil {
*/
public static void configurePushURI(RemoteConfig remoteConfig,
URIish pushURI) {
- List<URIish> pushURIs = new ArrayList<URIish>(
+ List<URIish> pushURIs = new ArrayList<>(
remoteConfig.getPushURIs());
for (URIish urIish : pushURIs) {
remoteConfig.removePushURI(urIish);
@@ -124,7 +124,7 @@ public class GerritUtil {
*/
public static void configurePushRefSpec(RemoteConfig remoteConfig,
String gerritBranch) {
- List<RefSpec> pushRefSpecs = new ArrayList<RefSpec>(
+ List<RefSpec> pushRefSpecs = new ArrayList<>(
remoteConfig.getPushRefSpecs());
for (RefSpec refSpec : pushRefSpecs) {
remoteConfig.removePushRefSpec(refSpec);
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/GitResourceDeltaVisitor.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/GitResourceDeltaVisitor.java
index 332af4926..a2d2feec1 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/GitResourceDeltaVisitor.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/GitResourceDeltaVisitor.java
@@ -89,7 +89,7 @@ public class GitResourceDeltaVisitor implements IResourceDeltaVisitor {
this.repository = repository;
filesToUpdate = new HashSet<>();
- resourcesToUpdate = new HashSet<IResource>();
+ resourcesToUpdate = new HashSet<>();
this.deletedProjects = deletedProjects;
}
@@ -266,7 +266,7 @@ public class GitResourceDeltaVisitor implements IResourceDeltaVisitor {
* @return collection of files to update
*/
public Collection<IFile> getFileResourcesToUpdate() {
- Collection<IFile> result = new ArrayList<IFile>();
+ Collection<IFile> result = new ArrayList<>();
for (IResource resource : resourcesToUpdate)
if (resource instanceof IFile)
result.add((IFile) resource);
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffUpdateJob.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffUpdateJob.java
index 0f8339aff..3483600d3 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffUpdateJob.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffUpdateJob.java
@@ -112,7 +112,7 @@ abstract class IndexDiffUpdateJob extends Job {
private void cleanup() {
synchronized (lock) {
files = new HashSet<>();
- resources = new HashSet<IResource>();
+ resources = new HashSet<>();
}
}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ExceptionCollector.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ExceptionCollector.java
index 291ffa9f3..b1baf98dc 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ExceptionCollector.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ExceptionCollector.java
@@ -34,7 +34,7 @@ import org.eclipse.core.runtime.Status;
*/
public class ExceptionCollector {
- private final List<IStatus> statuses = new ArrayList<IStatus>();
+ private final List<IStatus> statuses = new ArrayList<>();
private final String message;
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeleteBranchOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeleteBranchOperation.java
index 22b376062..fed53c924 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeleteBranchOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeleteBranchOperation.java
@@ -73,7 +73,7 @@ public class DeleteBranchOperation implements IEGitOperation {
*/
public DeleteBranchOperation(Repository repository, Ref branch,
boolean force) {
- this(repository, new HashSet<Ref>(asList(branch)), force);
+ this(repository, new HashSet<>(asList(branch)), force);
}
/**
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeletePathsOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeletePathsOperation.java
index 36c8a202f..1be86a731 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeletePathsOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/DeletePathsOperation.java
@@ -81,7 +81,7 @@ public class DeletePathsOperation implements IEGitOperation {
boolean errorOccurred = false;
boolean refreshAll = false;
- List<IPath> refreshCachePaths = new ArrayList<IPath>();
+ List<IPath> refreshCachePaths = new ArrayList<>();
for (IPath path : paths) {
IResource resource = ResourceUtil.getResourceForLocation(path, false);
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationResult.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationResult.java
index d8633bb5f..5fe23f00c 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationResult.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationResult.java
@@ -39,7 +39,7 @@ public class PushOperationResult {
* Construct empty push operation result.
*/
public PushOperationResult() {
- this.urisEntries = new LinkedHashMap<URIish, Entry>();
+ this.urisEntries = new LinkedHashMap<>();
}
/**
@@ -171,7 +171,7 @@ public class PushOperationResult {
final Collection<RemoteRefUpdate> oldUpdates = pr
.getRemoteUpdates();
- final ArrayList<RemoteRefUpdate> newUpdates = new ArrayList<RemoteRefUpdate>(
+ final ArrayList<RemoteRefUpdate> newUpdates = new ArrayList<>(
oldUpdates.size());
for (final RemoteRefUpdate rru : oldUpdates) {
final ObjectId expectedOldObjectId;
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationSpecification.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationSpecification.java
index a5f8809ba..3b0416a70 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationSpecification.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/PushOperationSpecification.java
@@ -37,7 +37,7 @@ public class PushOperationSpecification {
* {@link #addURIRefUpdates(URIish, Collection)} method.
*/
public PushOperationSpecification() {
- this.urisRefUpdates = new LinkedHashMap<URIish, Collection<RemoteRefUpdate>>();
+ this.urisRefUpdates = new LinkedHashMap<>();
}
/**
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/UntrackOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/UntrackOperation.java
index 97cfe4135..95bfd523f 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/UntrackOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/UntrackOperation.java
@@ -65,7 +65,7 @@ public class UntrackOperation implements IEGitOperation {
public UntrackOperation(final Collection<? extends IResource> rsrcs) {
rsrcList = rsrcs;
locations = Collections.emptyList();
- edits = new IdentityHashMap<Repository, DirCacheEditor>();
+ edits = new IdentityHashMap<>();
}
/**
@@ -82,7 +82,7 @@ public class UntrackOperation implements IEGitOperation {
rsrcList = Collections.emptyList();
this.locations = locations;
this.db = repository;
- edits = new IdentityHashMap<Repository, DirCacheEditor>();
+ edits = new IdentityHashMap<>();
}
@Override
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteFolder.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteFolder.java
index 6596ed69b..2847a508c 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteFolder.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteFolder.java
@@ -80,7 +80,7 @@ class GitRemoteFolder extends GitRemoteResource {
if (members == null || members.isEmpty())
return new GitRemoteResource[0];
- List<IResourceVariant> result = new ArrayList<IResourceVariant>();
+ List<IResourceVariant> result = new ArrayList<>();
monitor.beginTask(
NLS.bind(CoreText.GitRemoteFolder_fetchingMembers, getPath()),
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
index 4c9ade911..7ffd1c7fb 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
@@ -57,7 +57,7 @@ abstract class GitResourceVariantTree extends ResourceVariantTree {
@Override
public IResource[] roots() {
- Set<IResource> roots = new HashSet<IResource>();
+ Set<IResource> roots = new HashSet<>();
for (GitSynchronizeData gsd : gsds)
if (gsd.getPathFilter() == null)
roots.addAll(gsd.getProjects());
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java
index 3455dff8a..6c5169051 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java
@@ -126,7 +126,7 @@ public class GitSynchronizeDataSet implements Iterable<GitSynchronizeData> {
* @return list of all resources
*/
public IProject[] getAllProjects() {
- Set<IProject> resource = new HashSet<IProject>();
+ Set<IProject> resource = new HashSet<>();
for (GitSynchronizeData data : gsdSet) {
resource.addAll(data.getProjects());
}
diff --git a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/FeatureListOperation.java b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/FeatureListOperation.java
index 10608e890..493fc6cdd 100644
--- a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/FeatureListOperation.java
+++ b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/FeatureListOperation.java
@@ -41,7 +41,7 @@ public final class FeatureListOperation extends GitFlowOperation {
private static final String REMOTE_ORIGIN_FEATURE_PREFIX = R_REMOTES
+ DEFAULT_REMOTE_NAME + SEP;
- private List<Ref> result = new ArrayList<Ref>();
+ private List<Ref> result = new ArrayList<>();
private int timeout;
diff --git a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/CommitHyperlinkDetector.java b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/CommitHyperlinkDetector.java
index 5e8614445..694aa4362 100644
--- a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/CommitHyperlinkDetector.java
+++ b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/CommitHyperlinkDetector.java
@@ -233,7 +233,7 @@ public class CommitHyperlinkDetector extends AbstractHyperlinkDetector {
continue;
}
if (links == null) {
- links = new ArrayList<IHyperlink>();
+ links = new ArrayList<>();
}
int start = matcher.start(1);
Region region = new Region(contentOffset + start, matcher.end(1)
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java
index f5ddc247e..bfec48bc0 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java
@@ -111,11 +111,11 @@ public class CommonUtilsTest {
new LinkedHashSet<>(expected));
List<String> shuffeled = new ArrayList<>(expected);
Collections.shuffle(shuffeled, new Random(1));
- TreeSet<String> sortedSet = new TreeSet<String>(
+ TreeSet<String> sortedSet = new TreeSet<>(
CommonUtils.STRING_ASCENDING_COMPARATOR);
sortedSet.addAll(shuffeled);
assertEquals(expectedWithoutDuplicates,
- new ArrayList<String>(sortedSet));
+ new ArrayList<>(sortedSet));
}
@Test
@@ -130,7 +130,7 @@ public class CommonUtilsTest {
List<IResource> expected = Arrays
.asList(new IResource[] { f3, f2,
f1 });
- List<IResource> tmp = new ArrayList<IResource>(expected);
+ List<IResource> tmp = new ArrayList<>(expected);
Collections.shuffle(tmp, new Random(1));
Collections.sort(tmp, CommonUtils.RESOURCE_NAME_COMPARATOR);
assertEquals(expected, tmp);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/LinkedResourcesTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/LinkedResourcesTest.java
index 3926aae12..115d1fc86 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/LinkedResourcesTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/LinkedResourcesTest.java
@@ -72,7 +72,7 @@ public class LinkedResourcesTest extends LocalRepositoryTestCase {
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint point = registry.getExtensionPoint("org.eclipse.ui.commands");
IConfigurationElement[] elements = point.getConfigurationElements();
- ArrayList<RepositoryActionHandler> result = new ArrayList<RepositoryActionHandler>();
+ ArrayList<RepositoryActionHandler> result = new ArrayList<>();
for (IConfigurationElement e: elements) {
String categoryId = e.getAttribute("categoryId");
if ("org.eclipse.egit.ui.commandCategory".equals(categoryId)) {
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/synchronize/AbstractSynchronizeViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/synchronize/AbstractSynchronizeViewTest.java
index 468a9956a..481c2b2e6 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/synchronize/AbstractSynchronizeViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/synchronize/AbstractSynchronizeViewTest.java
@@ -259,7 +259,7 @@ public abstract class AbstractSynchronizeViewTest extends
.getDefaultCharset())), false, null);
IFile[] committableFiles = new IFile[] { gitignore };
- ArrayList<IFile> untracked = new ArrayList<IFile>();
+ ArrayList<IFile> untracked = new ArrayList<>();
untracked.addAll(Arrays.asList(committableFiles));
CommitOperation op = new CommitOperation(committableFiles,
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/TestRepositoryServerProvider.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/TestRepositoryServerProvider.java
index 3e805855f..15d3ce33c 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/TestRepositoryServerProvider.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/TestRepositoryServerProvider.java
@@ -26,7 +26,7 @@ public class TestRepositoryServerProvider implements IRepositoryServerProvider {
@Override
public Collection<RepositoryServerInfo> getRepositoryServerInfos() {
- List<RepositoryServerInfo> info = new ArrayList<RepositoryServerInfo>();
+ List<RepositoryServerInfo> info = new ArrayList<>();
try {
info.add(new RepositoryServerInfo("EGit Gerrit", new URI(
"http://egit.eclipse.org/r")));

Back to the top