-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
439 expand dynamic arg expands non dynamic args (#440)
* Added failing test when DynamicParameter name is beginning of Parameter name * JCommander.expandDynamicArg, assignment string should be present in arg
- Loading branch information
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/test/java/com/beust/jcommander/dynamic/ShadowingParameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.beust.jcommander.dynamic; | ||
|
||
import com.beust.jcommander.DynamicParameter; | ||
import com.beust.jcommander.Parameter; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class ShadowingParameter { | ||
|
||
@Parameter( | ||
names = "-abc" | ||
) | ||
String abc; | ||
@DynamicParameter( | ||
names = "-ab" | ||
) | ||
Map<String,String> ab = new HashMap<>(); | ||
|
||
} |