Skip to content

Commit

Permalink
Remove newlines #474
Browse files Browse the repository at this point in the history
Signed-off-by: jmehrens [email protected]
  • Loading branch information
jmehrens committed Mar 19, 2024
1 parent 058b0c2 commit 7fc8007
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ public void search(String line) throws IOException {
*/
//TODO: Fix this TestServer/ProtocolHandler so this test passes.
//TODO: Fix the test.
//@Test
@org.junit.Ignore
@Test
public void testUtf8Search() {
final String find = "\u2019\u7cfb\u7edf";
TestServer server = null;
Expand Down Expand Up @@ -154,13 +153,12 @@ public void search(String line) throws IOException {
}
}

//TODO: Fix the test.
//@Test
@org.junit.Ignore
public void testUtf8SubjectLiteral() throws Exception {
final String find = "\u2019\u7cfb\u7edf";
SubjectTerm term = new SubjectTerm(find);
InputStream in = new ByteArrayInputStream(new byte[0]);
InputStream in = new ByteArrayInputStream(find.getBytes("UTF-8"));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream out = new PrintStream(baos, true, "UTF-8");
Properties props = new Properties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ protected Argument size(SizeTerm term)
*
* Note that this format does not contain the TimeZone
*/
private static String[] monthTable = {
private static final String[] monthTable = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
Expand Down Expand Up @@ -580,16 +580,12 @@ private static final class Utf8Literal implements Literal {

@Override
public int size() {
return bytes.length + 4;
return bytes.length;
}

@Override
public void writeTo(OutputStream os) throws IOException {
os.write('\n');
os.write('\r');
os.write(this.bytes);
os.write('\n');
os.write('\r');
}
}
}

0 comments on commit 7fc8007

Please sign in to comment.