]> source.dussan.org Git - jgit.git/commitdiff
Move DiffFormatter default initialization to fields 83/1483/1
authorShawn O. Pearce <spearce@spearce.org>
Wed, 1 Sep 2010 03:27:25 +0000 (20:27 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 1 Sep 2010 17:19:42 +0000 (10:19 -0700)
Other fields in this class are initialized in their declaration, make
the code consistent with itself and use only one style.

Change-Id: I49a007e97ba52faa6b89f7e4b1eec85dccac0fa4
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java

index 40a5b3764f0dbfc432e7a5738531f923330bc165..231b8ab2089ffc674de5b424fbdfb494619e8f3c 100644 (file)
@@ -82,9 +82,9 @@ public class DiffFormatter {
 
        private Repository db;
 
-       private int context;
+       private int context = 3;
 
-       private int abbreviationLength;
+       private int abbreviationLength = 7;
 
        private RawText.Factory rawTextFactory = RawText.FACTORY;
 
@@ -100,8 +100,6 @@ public class DiffFormatter {
         */
        public DiffFormatter(OutputStream out) {
                this.out = out;
-               setContext(3);
-               setAbbreviationLength(7);
        }
 
        /** @return the stream we are outputting data to. */