Apache Solr open-source search software
catch user (me) silliness when using EarthDebugger
Mike McCandlessaeea493311e2
diff --git a/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.java b/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.javaindex 56dde88cd58..fdef990724a 100644--- a/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.java+++ b/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.java@@ -27,6 +27,7 @@ import org.apache.lucene.util.SloppyMath;public class EarthDebugger {final StringBuilder b = new StringBuilder();private int nextShape;+ private boolean finished;public EarthDebugger() {b.append("<!DOCTYPE HTML>\n");@@ -177,6 +178,10 @@ public class EarthDebugger {}public String finish() {+ if (finished) {+ throw new IllegalStateException("already finished");+ }+ finished = true;b.append(" WE.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{\n");b.append(" attribution: '© OpenStreetMap contributors'\n");b.append(" }).addTo(earth);\n");