]> source.dussan.org Git - jgit.git/commitdiff
[findBugs] Declare some private methods of WorkingTreeIterator static 04/22704/3
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 28 Feb 2014 10:48:20 +0000 (11:48 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 6 Mar 2014 00:01:38 +0000 (19:01 -0500)
Change-Id: I09cd39c367f408b5a963ff004f235f558990f338
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java

index 70f8327b1f9504b35a6cf2b0e4ee8c405e81cd49..964869bb87208e90397e733a2e20fe237e308d2c 100644 (file)
@@ -401,11 +401,11 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
                }
        }
 
-       private boolean isBinary(byte[] content, int sz) {
+       private static boolean isBinary(byte[] content, int sz) {
                return RawText.isBinary(content, sz);
        }
 
-       private boolean isBinary(Entry entry) throws IOException {
+       private static boolean isBinary(Entry entry) throws IOException {
                InputStream in = entry.openInputStream();
                try {
                        return RawText.isBinary(in);
@@ -414,7 +414,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
                }
        }
 
-       private ByteBuffer filterClean(byte[] src, int n)
+       private static ByteBuffer filterClean(byte[] src, int n)
                        throws IOException {
                InputStream in = new ByteArrayInputStream(src);
                try {
@@ -424,7 +424,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
                }
        }
 
-       private InputStream filterClean(InputStream in) {
+       private static InputStream filterClean(InputStream in) {
                return new EolCanonicalizingInputStream(in, true);
        }
 
@@ -980,7 +980,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
                return FS.detect().normalize(RawParseUtils.decode(content));
        }
 
-       private long computeLength(InputStream in) throws IOException {
+       private static long computeLength(InputStream in) throws IOException {
                // Since we only care about the length, use skip. The stream
                // may be able to more efficiently wade through its data.
                //
@@ -1183,7 +1183,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
                        return r.getRules().isEmpty() ? null : r;
                }
 
-               private void loadRulesFromFile(IgnoreNode r, File exclude)
+               private static void loadRulesFromFile(IgnoreNode r, File exclude)
                                throws FileNotFoundException, IOException {
                        if (FS.DETECTED.exists(exclude)) {
                                FileInputStream in = new FileInputStream(exclude);