Skip to content
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 build warnings #1485

Merged
merged 2 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package picocli.examples.kotlin.optional

import picocli.CommandLine
import picocli.CommandLine.Option
import java.lang.Boolean
import picocli.CommandLine.Parameters
import java.util.*

class SingleOptions {
Expand All @@ -13,9 +12,9 @@ class SingleOptions {
var y: Optional<Int> = Optional.empty()

@Option(names = ["-z", "--long"], negatable = true)
var z = Optional.of(Boolean.FALSE)
var z = Optional.of(false)

@CommandLine.Parameters(arity = "0..*")
@Parameters(arity = "0..*")
var positional = Optional.empty<String>()

@Option(names = ["-D"], mapFallbackValue = "_NULL_")
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -8744,7 +8744,8 @@ private String[] expandVariables(String[] desc) {
public Range arity() { return arity; }

/** Returns the name of the option or positional parameter used in the usage help message.
* @see Option#paramLabel() {@link Parameters#paramLabel()} */
* @see Option#paramLabel()
* @see Parameters#paramLabel() */
public String paramLabel() { return interpolate(paramLabel); }

/** Returns whether usage syntax decorations around the {@linkplain #paramLabel() paramLabel} should be suppressed.
Expand Down Expand Up @@ -9385,7 +9386,8 @@ private static String inferLabel(String label, String fieldName, ITypeInfo typeI
public Range arity() { return arity; }

/** Returns the name of the option or positional parameter used in the usage help message.
* @see Option#paramLabel() {@link Parameters#paramLabel()} */
* @see Option#paramLabel()
* @see Parameters#paramLabel() */
public String paramLabel() { return paramLabel; }

/** Returns whether usage syntax decorations around the {@linkplain #paramLabel() paramLabel} should be suppressed.
Expand Down