You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -449,7 +448,7 @@ public static void main(String[] args) {
449
448
Option fooOpt = Option.builder("foo")
450
449
.hasArg()
451
450
.desc("the foo arg")
452
-
.converter((s) -> new Foo(s))
451
+
.converter(Foo::new)
453
452
.build();</source>
454
453
The above will create an option that passes the string value to the Foo constructor when <code>commandLine.getParsedOptionValue(fooOpt)</code> is called.
455
454
</p>
@@ -509,10 +508,10 @@ public static void main(String[] args) {
509
508
try {
510
509
// parse the command line arguments
511
510
line = parser.parse(options, new String[] {"-n", "5"});
0 commit comments