We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de158f9 commit 33129baCopy full SHA for 33129ba
1 file changed
src/test/java/org/apache/commons/csv/LexerTest.java
@@ -452,8 +452,9 @@ public void testTrailingTextAfterQuote() throws Exception {
452
@Test
453
public void testTrimTrailingSpacesZeroLength() throws Exception {
454
final StringBuilder buffer = new StringBuilder("");
455
- final Lexer lexer = createLexer(buffer.toString(), CSVFormat.DEFAULT);
456
- lexer.trimTrailingSpaces(buffer);
457
- assertThat(lexer.nextToken(new Token()), matches(EOF, ""));
+ try (Lexer lexer = createLexer(buffer.toString(), CSVFormat.DEFAULT)) {
+ lexer.trimTrailingSpaces(buffer);
+ assertThat(lexer.nextToken(new Token()), matches(EOF, ""));
458
+ }
459
}
460
0 commit comments