From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: "Vasyl' Vavrychuk" <vvavrychuk@gmail.com>,
"Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [EGIT PATCH] Fixed trivial warnings. Mainly parametrized raw types, added serialVersionUID, removed unnecessery throws.
Date: Mon, 5 Jan 2009 00:04:41 +0100 [thread overview]
Message-ID: <200901050004.41531.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <gjrcni$9q$1@ger.gmane.org>
söndag 04 januari 2009 23:20:19 skrev Vasyl' Vavrychuk:
> Also fixed:
> 1. "The 'Eclipse-LazyStart' header is deprecated, use 'Bundle-ActivationPolicy'" warning.
> 2. Possible NullPointerException warning.
> 3. Unnecessery function parameter warning.
Thanks for your interest in the projects. Most changes from a 30 seconds review look reasonable.
However we don't apply changes this way. From your comments it seems we'd require about
five patches since the changes are of very different types.
-- robin
> diff --git a/org.spearce.egit.core.test/META-INF/MANIFEST.MF b/org.spearce.egit.core.test/META-INF/MANIFEST.MF
> index ee5f277..e8bcc79 100644
> --- a/org.spearce.egit.core.test/META-INF/MANIFEST.MF
> +++ b/org.spearce.egit.core.test/META-INF/MANIFEST.MF
> @@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.core.runtime,
> org.spearce.egit.ui,
> org.spearce.jgit,
> org.eclipse.core.filesystem
> -Eclipse-LazyStart: true
> +Bundle-ActivationPolicy: lazy
Any pointers on this? (so I can learn)
> diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileHistory.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileHistory.java
> index c01c1c3..61c32ce 100644
> --- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileHistory.java
> +++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileHistory.java
> @@ -50,11 +50,11 @@
> GitFileHistory(final IResource rsrc, final int flags,
> final IProgressMonitor monitor) {
> resource = rsrc;
> - walk = buildWalk(flags);
> + walk = buildWalk(/*flags*/);
> revisions = buildRevisions(monitor, flags);
> }
> - private KidWalk buildWalk(final int flags) {
> + private KidWalk buildWalk(/*final int flags*/) {
Can't we just drop the parameter completely and wipe every trace of it?
> final RepositoryMapping rm = RepositoryMapping.getMapping(resource);
> if (rm == null) {
> Activator.logError("Git not attached to project "
> diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java b/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java
> index 04130db..db5f20b 100644
> --- a/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java
> +++ b/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java
> @@ -48,9 +48,9 @@
> * a Git repository.
> */
> public class GitProjectData {
> - private static final Map projectDataCache = new HashMap();
> + private static final Map<IProject, GitProjectData> projectDataCache = new HashMap<IProject, GitProjectData>();
>
> - private static final Map repositoryCache = new HashMap();
> + private static final Map<File, WeakReference> repositoryCache = new HashMap<File, WeakReference>();
Been thinking about doing this myself but always found something more interesting to do. Good.
> diff --git a/org.spearce.jgit/src/org/spearce/jgit/treewalk/CanonicalTreeParser.java b/org.spearce.jgit/src/org/spearce/jgit/treewalk/CanonicalTreeParser.java
> index dcc53cd..4700510 100644
> --- a/org.spearce.jgit/src/org/spearce/jgit/treewalk/CanonicalTreeParser.java
> +++ b/org.spearce.jgit/src/org/spearce/jgit/treewalk/CanonicalTreeParser.java
> @@ -175,8 +175,9 @@ public void back(int delta) {
> // space so this prunes our search more quickly.
> //
> ptr -= Constants.OBJECT_ID_LENGTH;
> - while (raw[--ptr] != ' ')
> - /* nothing */;
> + while (raw[--ptr] != ' ') {
> + /* nothing */
> + }
Not sure if this buys us anything. I wouldn't react if original code was either way, but
changing it seems unnecessary.
-- robin
next prev parent reply other threads:[~2009-01-04 23:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-04 22:20 [EGIT PATCH] Fixed trivial warnings. Mainly parametrized raw types, added serialVersionUID, removed unnecessery throws Vasyl' Vavrychuk
2009-01-04 23:04 ` Robin Rosenberg [this message]
2009-01-05 1:08 ` Vasyl' Vavrychuk
2009-01-05 1:13 ` Vasyl' Vavrychuk
2009-01-04 23:26 ` Vasyl' Vavrychuk
2009-01-05 2:19 ` Shawn O. Pearce
2009-01-06 0:54 ` Robin Rosenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200901050004.41531.robin.rosenberg.lists@dewire.com \
--to=robin.rosenberg.lists@dewire.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
--cc=vvavrychuk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).