Skip to content

Commit

Permalink
Fix build by suppressing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
magicDGS committed Nov 30, 2017
1 parent d0a4dcf commit 4f2e0c7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ private void setPositionalArgument(final String stringValue) {
c.add(value);
}

@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
private void setArgument(ArgumentDefinition argumentDefinition, List<String> values) {
//special treatment for flags
if (argumentDefinition.isFlag() && values.isEmpty()){
Expand Down Expand Up @@ -685,6 +685,7 @@ private void setArgument(ArgumentDefinition argumentDefinition, List<String> val
}
}

@SuppressWarnings({"unchecked", "rawtypes"})
private void setParsedArgumentValue(final ArgumentDefinition argumentDefinition, final Object value) {
if (argumentDefinition.isCollection) {
if (value == null) {
Expand All @@ -700,6 +701,7 @@ private void setParsedArgumentValue(final ArgumentDefinition argumentDefinition,
}

// apply a function to a collection, catching UnsuportedOperationException into a more informative
@SuppressWarnings("rawtypes")
private void applyToCollection(final ArgumentDefinition argumentDefinitionCollection, final Consumer<Collection> function) {

final Collection c = (Collection) argumentDefinitionCollection.getFieldValue();
Expand Down

0 comments on commit 4f2e0c7

Please sign in to comment.