Conversation
| , text | ||
| , is( expectedContent ) ); | ||
| try (Scanner base = new Scanner( expandedFile ); | ||
| Scanner scanner = base.useDelimiter( "\n" ) ) |
There was a problem hiding this comment.
Having two local variables with the same reference is not necessary. It is the flow design:
https://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#useDelimiter(java.util.regex.Pattern)
There was a problem hiding this comment.
This was an interesting corner case I'd not encountered before and it took a while to figure out. It cures a warning about failure to close the first scanner in try-with-resources block. Though looking at it now I see another way to approach this.
src/test/java/org/apache/maven/shared/utils/cli/CommandLineUtilsTest.java
Show resolved
Hide resolved
elharo
left a comment
There was a problem hiding this comment.
Ping. Can I move forward with this one?
|
which branch at https://builds.apache.org/job/maven-box/job/maven-shared-utils/ ? |
|
… On Sat, Mar 21, 2020 at 10:54 AM Robert Scholte ***@***.***> wrote:
which branch at
https://builds.apache.org/job/maven-box/job/maven-shared-utils/ ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVP2EQ5QGW4MRUUEVFQV3RITILBANCNFSM4KZ34H3A>
.
--
Elliotte Rusty Harold
[email protected]
|
elharo
left a comment
There was a problem hiding this comment.
Can I get a formal approval on this?
@Tibor17