]> source.dussan.org Git - jgit.git/commitdiff
Add missing static qualifier in DiffFormatter 57/22057/2
authorShawn Pearce <spearce@spearce.org>
Fri, 14 Feb 2014 17:46:52 +0000 (09:46 -0800)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 17 Feb 2014 21:15:51 +0000 (22:15 +0100)
These methods do not touch instance members and can avoid the
implicit "this" argument.

Change-Id: I01c30bb22266eed1c9db18bdf9f90c1c1590e3ec
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java

index f660d6bbd9064a314d6bbbc300e3bf8deed250a0..9e26c3747fad64fb264d404bc03dbed0db59fbb6 100644 (file)
@@ -633,7 +633,7 @@ public class DiffFormatter {
                format(res.header, res.a, res.b);
        }
 
-       private void writeGitLinkDiffText(OutputStream o, DiffEntry ent)
+       private static void writeGitLinkDiffText(OutputStream o, DiffEntry ent)
                        throws IOException {
                if (ent.getOldMode() == GITLINK) {
                        o.write(encodeASCII("-Subproject commit " + ent.getOldId().name() //$NON-NLS-1$
@@ -757,7 +757,7 @@ public class DiffFormatter {
                writeLine(' ', text, line);
        }
 
-       private boolean isEndOfLineMissing(final RawText text, final int line) {
+       private static boolean isEndOfLineMissing(final RawText text, final int line) {
                return line + 1 == text.size() && text.isMissingNewlineAtEnd();
        }