Skip to content

Commit

Permalink
fix NPE reported in #6519
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Oct 8, 2017
1 parent 1dc3fb4 commit d88898b
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2739,11 +2739,19 @@ public CodegenParameter fromParameter(Parameter param, Set<String> imports) {
}

public boolean isDataTypeBinary(String dataType) {
return dataType.toLowerCase().startsWith("byte");
if (dataType != null) {
return dataType.toLowerCase().startsWith("byte");
} else {
return false;
}
}

public boolean isDataTypeFile(String dataType) {
return dataType.toLowerCase().equals("file");
if (dataType != null) {
return dataType.toLowerCase().equals("file");
} else {
return false;
}
}

/**
Expand Down

0 comments on commit d88898b

Please sign in to comment.