-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix a number of small warnings and formatting issues #10
Conversation
, text | ||
, is( expectedContent ) ); | ||
try (Scanner base = new Scanner( expandedFile ); | ||
Scanner scanner = base.useDelimiter( "\n" ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
elharo@macfaq.com
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I get a formal approval on this?
@Tibor17