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 Oct 31, 2017
1 parent 865f95e commit 43b3c49
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,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 @@ -691,6 +691,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 @@ -706,6 +707,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 43b3c49

Please sign in to comment.