Skip to content

Commit f91ba70

Browse files
committed
No need to initialize to default.
1 parent 5c386dc commit f91ba70

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/java/org/apache/commons/cli/HelpFormatterTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ public void testPrintOptions() throws Exception
165165
final int descPad = 3;
166166
final String lpad = hf.createPadding(leftPad);
167167
final String dpad = hf.createPadding(descPad);
168-
Options options = null;
169-
String expected = null;
168+
Options options;
169+
String expected;
170170

171171
options = new Options().addOption("a", false, "aaaa aaaa aaaa aaaa aaaa");
172172
expected = lpad + "-a" + dpad + "aaaa aaaa aaaa aaaa aaaa";
@@ -235,7 +235,7 @@ public void testPrintHelpWithEmptySyntax()
235235
public void testAutomaticUsage() throws Exception
236236
{
237237
final HelpFormatter hf = new HelpFormatter();
238-
Options options = null;
238+
Options options;
239239
String expected = "usage: app [-a]";
240240
final ByteArrayOutputStream out = new ByteArrayOutputStream();
241241
final PrintWriter pw = new PrintWriter(out);

0 commit comments

Comments
 (0)