Skip to content

Commit d60a922

Browse files
committed
make message encoder return type nullable to prevent kotlin's compilation errors
1 parent e3d594c commit d60a922

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jooby/src/main/java/io/jooby/MessageEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import io.jooby.exception.NotAcceptableException;
99

1010
import javax.annotation.Nonnull;
11+
import javax.annotation.Nullable;
1112
import java.nio.charset.StandardCharsets;
1213

1314
/**
@@ -34,7 +35,7 @@ public interface MessageEncoder {
3435
* @return Value as byte array or <code>null</code> if given object isn't supported it.
3536
* @throws Exception If something goes wrong.
3637
*/
37-
@Nonnull byte[] encode(@Nonnull Context ctx, @Nonnull Object value) throws Exception;
38+
@Nullable byte[] encode(@Nonnull Context ctx, @Nonnull Object value) throws Exception;
3839

3940
/**
4041
* Execute this renderer only if the <code>Accept</code> header matches the content-type

0 commit comments

Comments
 (0)