You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/20 23:21:08 UTC
[commons-cli] branch master updated: No need to initialize to
default.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git
The following commit(s) were added to refs/heads/master by this push:
new f91ba70 No need to initialize to default.
f91ba70 is described below
commit f91ba7058dc9d733d7f8177df88b2f44144be72e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 18:21:04 2020 -0500
No need to initialize to default.
---
src/test/java/org/apache/commons/cli/HelpFormatterTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/cli/HelpFormatterTest.java b/src/test/java/org/apache/commons/cli/HelpFormatterTest.java
index 20393de..449810f 100644
--- a/src/test/java/org/apache/commons/cli/HelpFormatterTest.java
+++ b/src/test/java/org/apache/commons/cli/HelpFormatterTest.java
@@ -165,8 +165,8 @@ public class HelpFormatterTest
final int descPad = 3;
final String lpad = hf.createPadding(leftPad);
final String dpad = hf.createPadding(descPad);
- Options options = null;
- String expected = null;
+ Options options;
+ String expected;
options = new Options().addOption("a", false, "aaaa aaaa aaaa aaaa aaaa");
expected = lpad + "-a" + dpad + "aaaa aaaa aaaa aaaa aaaa";
@@ -235,7 +235,7 @@ public class HelpFormatterTest
public void testAutomaticUsage() throws Exception
{
final HelpFormatter hf = new HelpFormatter();
- Options options = null;
+ Options options;
String expected = "usage: app [-a]";
final ByteArrayOutputStream out = new ByteArrayOutputStream();
final PrintWriter pw = new PrintWriter(out);