]> source.dussan.org Git - jgit.git/commitdiff
Remove dead RawText(RawTextComparator) constructor 43/1743/1
authorShawn O. Pearce <spearce@spearce.org>
Thu, 14 Oct 2010 03:47:08 +0000 (20:47 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 14 Oct 2010 03:48:51 +0000 (20:48 -0700)
Since the introduction of HashedSequence we no longer need to supply
the RawTextComparator at the time of constructing a RawText.  Drop the
definition from the constructor, because it doesn't make sense as part
of our public API.

Change-Id: Iaab34611d60eee4a2036830142b089b2dae81842
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreAllWhitespaceTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreLeadingWhitespaceTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreTrailingWhitespaceTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java

index c59f3780b1ff35fd95edd15d055ba93c5160b3ad..f97763f5c3352c2c28fbe0a6061a40c8cf583bfd 100644 (file)
@@ -52,9 +52,9 @@ public class RawTextIgnoreAllWhitespaceTest extends TestCase {
        private final RawTextComparator cmp = RawTextComparator.WS_IGNORE_ALL;
 
        public void testEqualsWithoutWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\nfoo-b\nfoo\n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-b\nfoo-c\nf\n"));
 
                assertEquals(3, a.size());
@@ -74,9 +74,9 @@ public class RawTextIgnoreAllWhitespaceTest extends TestCase {
        }
 
        public void testEqualsWithWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\n         \n a b c\na      \n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-a        b\n\nab  c\na\n"));
 
                // "foo-a" != "foo-a        b"
index 647fa30d2e7eb36512fe4bf05d159f2bb8b9bc2b..e510bddc62fe16da6fb502349f2052c7ec8e9467 100644 (file)
@@ -52,9 +52,9 @@ public class RawTextIgnoreLeadingWhitespaceTest extends TestCase {
        private final RawTextComparator cmp = RawTextComparator.WS_IGNORE_LEADING;
 
        public void testEqualsWithoutWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\nfoo-b\nfoo\n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-b\nfoo-c\nf\n"));
 
                assertEquals(3, a.size());
@@ -74,9 +74,9 @@ public class RawTextIgnoreLeadingWhitespaceTest extends TestCase {
        }
 
        public void testEqualsWithWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\n         \n a b c\n      a\nb    \n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-a        b\n\nab  c\na\nb\n"));
 
                // "foo-a" != "foo-a        b"
index b6999cd031e913d6999cfef3bb26a7305dd100a0..de7e5bf4d15765c6211dd76d0a07a85a32cb5253 100644 (file)
@@ -52,9 +52,9 @@ public class RawTextIgnoreTrailingWhitespaceTest extends TestCase {
        private final RawTextComparator cmp = RawTextComparator.WS_IGNORE_TRAILING;
 
        public void testEqualsWithoutWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\nfoo-b\nfoo\n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-b\nfoo-c\nf\n"));
 
                assertEquals(3, a.size());
@@ -74,9 +74,9 @@ public class RawTextIgnoreTrailingWhitespaceTest extends TestCase {
        }
 
        public void testEqualsWithWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\n         \n a b c\na      \n    b\n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-a        b\n\nab  c\na\nb\n"));
 
                // "foo-a" != "foo-a        b"
index 62a079f395fc5346877f10432144054c2e58d128..c601130be7f610bf1253b145951c92f4cf446229 100644 (file)
@@ -52,9 +52,9 @@ public class RawTextIgnoreWhitespaceChangeTest extends TestCase {
        private final RawTextComparator cmp = RawTextComparator.WS_IGNORE_CHANGE;
 
        public void testEqualsWithoutWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\nfoo-b\nfoo\n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-b\nfoo-c\nf\n"));
 
                assertEquals(3, a.size());
@@ -74,9 +74,9 @@ public class RawTextIgnoreWhitespaceChangeTest extends TestCase {
        }
 
        public void testEqualsWithWhitespace() {
-               final RawText a = new RawText(cmp, Constants
+               final RawText a = new RawText(Constants
                                .encodeASCII("foo-a\n         \n a b c\na      \n  foo\na  b  c\n"));
-               final RawText b = new RawText(cmp, Constants
+               final RawText b = new RawText(Constants
                                .encodeASCII("foo-a        b\n\nab  c\na\nfoo\na b     c  \n"));
 
                // "foo-a" != "foo-a        b"
index 7d098745019832642e51041c9ab4f1fe5fb84fbe..428183c94311e4a89cd8c298b662e8fa407ea2e9 100644 (file)
@@ -85,21 +85,6 @@ public class RawText extends Sequence {
         *            through cached arrays is safe.
         */
        public RawText(final byte[] input) {
-               this(RawTextComparator.DEFAULT, input);
-       }
-
-       /**
-        * Create a new sequence from an existing content byte array.
-        *
-        * The entire array (indexes 0 through length-1) is used as the content.
-        *
-        * @param cmp
-        *            comparator that will later be used to compare texts.
-        * @param input
-        *            the content array. The array is never modified, so passing
-        *            through cached arrays is safe.
-        */
-       public RawText(RawTextComparator cmp, byte[] input) {
                content = input;
                lines = RawParseUtils.lineMap(content, 0, content.length);
        }