[CLI-336] Deprecation not always reported#284
Conversation
|
I don't understand how coverage checks can not be met when the added methods are covered based on jacoco report. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #284 +/- ##
============================================
+ Coverage 91.90% 94.87% +2.97%
- Complexity 575 661 +86
============================================
Files 22 23 +1
Lines 1247 1386 +139
Branches 210 227 +17
============================================
+ Hits 1146 1315 +169
+ Misses 63 38 -25
+ Partials 38 33 -5 ☔ View full report in Codecov by Sentry. |
|
Codecov is currently broken. Uploads now require an authentication token for the master branch, but apparently not for PR branches. The master build codecov upload failed, see last CI build. So although the codecov uploaded from this PR, there is no record for the base commit and codecov errors with missing coverage. There is a ticket to resolve this by adding a token to all commons repos: INFRA-25729. However generating an org level token requires an org level github account and apache does not have one. So this is an unresolved issue. It may require a move away from codecov to some other tool, or negotiation with codecov to provide an alternative authentication mechanism for open source repos. |
| */ | ||
| public String getOptionValue(final OptionGroup optionGroup) { | ||
| final String[] values = getOptionValues(optionGroup); | ||
| return values == null ? null : values[0]; |
There was a problem hiding this comment.
Is it possible for the array to be empty?
There was a problem hiding this comment.
No, getOptionValues returns null or an array with a value. In the case where it might return an empty array it returns null.
You are NOT testing ALL of the new APIs added in this PR. Run: Then open |
|
@Claudenw ping |
|
I am traveling and moving over thenext two weeks. I hope to get to this later this week, time permitting. |
|
@Claudenw |
|
Got a clean build ;) |
|
Hi @Claudenw |

fixes for CLI-336
updated javadoc for OptionGroup.getSelected(), OptionGroup.isSelected() and OptionGroup.select() methods to indicate that deprecated options do not trigger logging of deprecated option usage.
CommandLine methods hasOption(OptionGroup), getOptionValue(OptionGroup), getOptionValues(OptionGroup), and getParsedOptionValue(OptionGroup) methods.