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:33:18 UTC
lucene-solr:branch_6x: catch user (me) silliness when using
EarthDebugger
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x 9ab336ebb -> 930d9f912
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/930d9f91
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/930d9f91
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/930d9f91
Branch: refs/heads/branch_6x
Commit: 930d9f91254881c859c99417bcfdf5588d54122d
Parents: 9ab336e
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:54 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/930d9f91/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");