NPE fix. type can be null

This commit is contained in:
Kohsuke Kawaguchi
2016-08-05 21:19:32 -07:00
parent 63f500ad7f
commit 4f15b7c9fa

View File

@@ -516,7 +516,7 @@ class Requester {
if (responseCode == 304) {
return null; // special case handling for 304 unmodified, as the content will be ""
}
if (responseCode == 204 && type.isArray()) {
if (responseCode == 204 && type!=null && type.isArray()) {
// no content
return type.cast(Array.newInstance(type.getComponentType(),0));
}