eclipsesource / eclipsesource/restfuse
getType fails with NullPointerException for responses without type
Open
- Dominant language
- Java
- Stars
- 95
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
I'm getting a NullPointerException when calling the following method:
com.eclipsesource.restfuse.internal.ResponseImpl#getType
public MediaType getType() {
String type = clientResponse.getType().toString();
return MediaType.fromString( type );
}
I think it can be fixed by returning a null in this case
public MediaType getType() {
if (clientResponse.getType()==null)
return null;
String type = clientResponse.getType().toString();
return MediaType.fromString( type );
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.