dimsuz
01/18/2023, 3:14 PMokio
?
The trivial thing to do is something like bufferedSource.readUtf8() == otherSource.readUtf8()
but I suspect it's not that good to do this.jw
01/18/2023, 3:16 PMjw
01/18/2023, 3:16 PMjw
01/18/2023, 3:18 PMrequest(Segment.SIZE)
on each BufferedSource
to get a whole segment's byte array to be filled and then do a mismatch on thatjw
01/18/2023, 3:18 PMjw
01/18/2023, 3:19 PMsize != other.size
checkjw
01/18/2023, 3:23 PMrequest(Segment.SIZE)
thing and then call readByteString()
which will create a ByteString
that shares the backing Segment
. Then you can do a simple ==
.jw
01/18/2023, 3:24 PMdimsuz
01/18/2023, 3:44 PMjessewilson
01/19/2023, 4:57 AMLamberto Basti
01/19/2023, 12:09 PMwhaever?.let {
// whatever
}, // <- the comma!
Basically, just a comma after invoking endControlFlow()
?jw
01/19/2023, 12:15 PMLamberto Basti
01/19/2023, 12:16 PMfun CodeBlock.Builder.endControlFlow(format: String, vararg args: Any) = apply {
unindent()
add("}$format\n", args)
}
works 🙂 I thought the iner functions of endControlFlow
where private, but turns out it is just an add("}\n")
trevjones
01/20/2023, 12:20 AM@JsonQualifier
annotation class WithFallback(
vararg val qualifiers: Annotation
)
context: github has json that is inconsistent between different types of webhook payloads. accident of history i suspect.
"created_at": 1459436810
"created_at": "2023-01-12T22:40:19Z"
Ideally it would looks something like this in usage.
@WithFallback(qualifiers = [ISOZonedDateTime(), EpochMillis()]) val created_at: ZonedDateTime,
eygraber
01/20/2023, 12:32 AMsaket
01/20/2023, 12:33 AMsaket
01/20/2023, 12:34 AMeygraber
01/20/2023, 12:35 AMPaul Woitaschek
01/20/2023, 7:58 AMjw
01/20/2023, 12:21 PMalec
01/20/2023, 1:29 PMalec
01/20/2023, 2:55 PMJan Skrasek
01/23/2023, 2:41 PMjw
01/23/2023, 2:43 PMjw
01/23/2023, 2:43 PMjw
01/23/2023, 2:44 PMJan Skrasek
01/23/2023, 2:48 PMTolriq
01/23/2023, 3:27 PMBufferedSink.writeAll( BufferedSource)
swallows some exceptions leading to nothing written?jw
01/23/2023, 3:29 PMjw
01/23/2023, 3:30 PM