Small improvements

This commit is contained in:
AsamK 2022-11-01 21:57:23 +01:00
parent 2e4d346bc8
commit 43face8ead
12 changed files with 35 additions and 35 deletions

View file

@ -5,5 +5,5 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.io.InputStream;
public record JsonAttachmentData(
@JsonSerialize(using=JsonStreamSerializer.class) InputStream data
@JsonSerialize(using = JsonStreamSerializer.class) InputStream data
) {}

View file

@ -43,11 +43,7 @@ record JsonStoryMessage(
}
public record Gradient(
String startColor,
String endColor,
List<String> colors,
List<Float> positions,
Integer angle
String startColor, String endColor, List<String> colors, List<Float> positions, Integer angle
) {
static Gradient from(MessageEnvelope.Story.TextAttachment.Gradient gradient) {

View file

@ -11,9 +11,7 @@ public class JsonStreamSerializer extends JsonSerializer<InputStream> {
@Override
public void serialize(
final InputStream value,
final JsonGenerator jsonGenerator,
final SerializerProvider serializers
final InputStream value, final JsonGenerator jsonGenerator, final SerializerProvider serializers
) throws IOException {
jsonGenerator.writeBinary(value, -1);
}