Skip to content

Commit 44874b5

Browse files
author
Vladimir Kotal
committed
remove tests for default encoding in TextAnalyzer
fixes #2205
1 parent b25310e commit 44874b5

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

test/org/opensolaris/opengrok/analysis/TextAnalyzerTest.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
21+
* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
2222
* Portions Copyright (c) 2017, Chris Fraire <[email protected]>.
2323
*/
2424
package org.opensolaris.opengrok.analysis;
@@ -40,7 +40,6 @@
4040

4141
public class TextAnalyzerTest {
4242

43-
private final String defaultEncoding = new InputStreamReader(new ByteArrayInputStream(new byte[0])).getEncoding();
4443
private String encoding;
4544
private String contents;
4645

@@ -53,23 +52,11 @@ public InputStream getStream() throws IOException {
5352
};
5453
}
5554

56-
@Test
57-
public void defaultEncoding() throws IOException {
58-
new TestableTextAnalyzer().analyze(new Document(),
59-
getStreamSource("hello".getBytes()), null);
60-
61-
assertEquals(defaultEncoding, encoding);
62-
63-
assertEquals("hello", contents);
64-
}
65-
6655
@Test
6756
public void resetsStreamOnShortInput() throws IOException {
6857
new TestableTextAnalyzer().analyze(new Document(),
6958
getStreamSource("hi".getBytes()), null);
7059

71-
assertEquals(defaultEncoding, encoding);
72-
7360
assertEquals("hi", contents);
7461
}
7562

0 commit comments

Comments
 (0)