Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4f15b7c

Browse files
committed
NPE fix. type can be null
1 parent 63f500a commit 4f15b7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/kohsuke/github/Requester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ private <T> T parse(Class<T> type, T instance) throws IOException {
516516
if (responseCode == 304) {
517517
return null; // special case handling for 304 unmodified, as the content will be ""
518518
}
519-
if (responseCode == 204 && type.isArray()) {
519+
if (responseCode == 204 && type!=null && type.isArray()) {
520520
// no content
521521
return type.cast(Array.newInstance(type.getComponentType(),0));
522522
}

0 commit comments

Comments
 (0)