git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [EGIT PATCH 01/25] Use generics for collections in commit dialog and import page
@ 2009-03-18  0:40 Robin Rosenberg
  2009-03-18  1:45 ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Rosenberg @ 2009-03-18  0:40 UTC (permalink / raw
  To: spearce; +Cc: git, Robin Rosenberg

A little cleaner and fewer warnings.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../ui/internal/clone/GitProjectsImportPage.java   |   16 ++++++++--------
 .../egit/ui/internal/dialogs/CommitDialog.java     |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/GitProjectsImportPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/GitProjectsImportPage.java
index ece585a..5d82edc 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/GitProjectsImportPage.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/GitProjectsImportPage.java
@@ -508,7 +508,7 @@ public void run(IProgressMonitor monitor) {
 							UIText.WizardProjectsImportPage_SearchingMessage,
 							100);
 					selectedProjects = new ProjectRecord[0];
-					Collection files = new ArrayList();
+					Collection<File> files = new ArrayList<File>();
 					monitor.worked(10);
 					if (directory.isDirectory()) {
 
@@ -516,14 +516,14 @@ public void run(IProgressMonitor monitor) {
 								null, monitor)) {
 							return;
 						}
-						Iterator filesIterator = files.iterator();
+						Iterator<File> filesIterator = files.iterator();
 						selectedProjects = new ProjectRecord[files.size()];
 						int index = 0;
 						monitor.worked(50);
 						monitor
 								.subTask(UIText.WizardProjectsImportPage_ProcessingMessage);
 						while (filesIterator.hasNext()) {
-							File file = (File) filesIterator.next();
+							File file = filesIterator.next();
 							selectedProjects[index] = new ProjectRecord(file);
 							index++;
 						}
@@ -562,8 +562,8 @@ setMessage(UIText.WizardProjectsImportPage_projectsInWorkspace,
 	 *            The monitor to report to
 	 * @return boolean <code>true</code> if the operation was completed.
 	 */
-	private boolean collectProjectFilesFromDirectory(Collection files,
-			File directory, Set directoriesVisited, IProgressMonitor monitor) {
+	private boolean collectProjectFilesFromDirectory(Collection<File> files,
+			File directory, Set<String> directoriesVisited, IProgressMonitor monitor) {
 
 		if (monitor.isCanceled()) {
 			return false;
@@ -577,7 +577,7 @@ private boolean collectProjectFilesFromDirectory(Collection files,
 
 		// Initialize recursion guard for recursive symbolic links
 		if (directoriesVisited == null) {
-			directoriesVisited = new HashSet();
+			directoriesVisited = new HashSet<String>();
 			try {
 				directoriesVisited.add(directory.getCanonicalPath());
 			} catch (IOException exception) {
@@ -759,13 +759,13 @@ public CheckboxTreeViewer getProjectsList() {
 	 *         workspace
 	 */
 	public ProjectRecord[] getValidProjects() {
-		List validProjects = new ArrayList();
+		List<ProjectRecord> validProjects = new ArrayList<ProjectRecord>();
 		for (int i = 0; i < selectedProjects.length; i++) {
 			if (!isProjectInWorkspace(selectedProjects[i].getProjectName())) {
 				validProjects.add(selectedProjects[i]);
 			}
 		}
-		return (ProjectRecord[]) validProjects
+		return validProjects
 				.toArray(new ProjectRecord[validProjects.size()]);
 	}
 
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/CommitDialog.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/CommitDialog.java
index b69a4ba..e6bd02d 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/CommitDialog.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/CommitDialog.java
@@ -366,7 +366,7 @@ public void handleEvent(Event arg0) {
 				}
 				try {
 					ArrayList<GitIndex> changedIndexes = new ArrayList<GitIndex>();
-					for (Iterator<Object> it = sel.iterator(); it.hasNext();) {
+					for (Iterator<?> it = sel.iterator(); it.hasNext();) {
 						CommitItem commitItem = (CommitItem) it.next();
 
 						IProject project = commitItem.file.getProject();
-- 
1.6.1.285.g35d8b

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [EGIT PATCH 01/25] Use generics for collections in commit dialog and import page
  2009-03-18  0:40 [EGIT PATCH 01/25] Use generics for collections in commit dialog and import page Robin Rosenberg
@ 2009-03-18  1:45 ` Shawn O. Pearce
  2009-03-18  6:32   ` Robin Rosenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2009-03-18  1:45 UTC (permalink / raw
  To: Robin Rosenberg; +Cc: git

> Subject: Re: [EGIT PATCH 01/25] Use generics for collections in commit
..............................^^

Are there 24 remaining patches in this series?  I only got this one.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [EGIT PATCH 01/25] Use generics for collections in commit dialog and import page
  2009-03-18  1:45 ` Shawn O. Pearce
@ 2009-03-18  6:32   ` Robin Rosenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Robin Rosenberg @ 2009-03-18  6:32 UTC (permalink / raw
  To: Shawn O. Pearce; +Cc: git

onsdag 18 mars 2009 02:45:37 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> > Subject: Re: [EGIT PATCH 01/25] Use generics for collections in commit
> ..............................^^
> 
> Are there 24 remaining patches in this series?  I only got this one.

Ah, sorry. There's only one that I want to submit.

-- robin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-18  6:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18  0:40 [EGIT PATCH 01/25] Use generics for collections in commit dialog and import page Robin Rosenberg
2009-03-18  1:45 ` Shawn O. Pearce
2009-03-18  6:32   ` Robin Rosenberg

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).