You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/04/16 11:32:56 UTC

lucene-solr:master: catch user (me) silliness when using EarthDebugger

Repository: lucene-solr
Updated Branches:
  refs/heads/master 922210401 -> aeea49331


catch user (me) silliness when using EarthDebugger


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/aeea4933
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/aeea4933
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/aeea4933

Branch: refs/heads/master
Commit: aeea493311e20eded19322ee53f47c4bb40a5ae9
Parents: 9222104
Author: Mike McCandless <mi...@apache.org>
Authored: Sat Apr 16 05:35:19 2016 -0400
Committer: Mike McCandless <mi...@apache.org>
Committed: Sat Apr 16 05:35:19 2016 -0400

----------------------------------------------------------------------
 .../src/java/org/apache/lucene/geo/EarthDebugger.java           | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/aeea4933/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.java
----------------------------------------------------------------------
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.java
index 56dde88..fdef990 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");