Skip to content

Instantly share code, notes, and snippets.

@serba
serba / integer-overflow.json
Last active Dec 3, 2021
Jetty Integer Overflow Exception
View integer-overflow.json
{
"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 Oct 19, 2017
InputStream that fills a buffer and runs a callback
View Main.java
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;