Skip to content

Instantly share code, notes, and snippets.

@serba
serba / integer-overflow.json
Last active December 3, 2021 23:59
Jetty Integer Overflow Exception
{
"loggerName": "org.apache.solr.update.processor.DistributedZkUpdateProcessor",
"message": "Error sending update to http://<solr-node>/solr",
"thrown": {
"commonElementCount": 0,
"localizedMessage": "java.lang.IllegalArgumentException: Invalid stream id: -2147483647",
"message": "java.lang.IllegalArgumentException: Invalid stream id: -2147483647",
"name": "java.io.IOException",
"cause": {
"commonElementCount": 8,
@serba
serba / Main.java
Last active October 19, 2017 04:06
InputStream that fills a buffer and runs a callback
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.SequenceInputStream;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.Iterators;
import org.apache.commons.io.IOUtils;