Skip to content
This repository has been archived by the owner on Nov 12, 2020. It is now read-only.

Commit

Permalink
Optional.of() -> Optional.ofNullable()
Browse files Browse the repository at this point in the history
  • Loading branch information
rolando-ebi committed May 22, 2018
1 parent ba0324d commit 2efb12a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ public class FileMessage {
*/
@JsonIgnore
public Optional<String> getMediaType(){
return Optional.of(ContentType.parse(this.getContentType()).getParameter("dcp-type"));
return Optional.ofNullable(ContentType.parse(this.getContentType()).getParameter("dcp-type"));
}
}

0 comments on commit 2efb12a

Please sign in to comment.