summaryrefslogtreecommitdiffstats
path: root/vespa-documentgen-plugin
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-16 10:58:26 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-16 10:58:26 +0100
commit2bcaf96baa296ad84881c79f537b1acb3805b160 (patch)
treeda069c3f1cfda45d6aaa3c6b1952b75b155cff26 /vespa-documentgen-plugin
parent0cda61be099cc167ca3b896ce201e5e21fd6e152 (diff)
Preserve old behavior where doing a setFieldValue on a string field,
would make an empty spanTreeMap when there where no annotations. However this is different that using the generated setter, which will not touch any annotations. But that is the same issue as always.
Diffstat (limited to 'vespa-documentgen-plugin')
-rw-r--r--vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java13
1 files changed, 0 insertions, 13 deletions
diff --git a/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java b/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
index 8434f9b635a..a1ba05eacb3 100644
--- a/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
+++ b/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
@@ -578,7 +578,6 @@ public class DocumentGenMojo extends AbstractMojo {
exportGetFieldCount(fieldSet, out, ind);
exportGetField(out, ind);
exportGetFieldValue(fieldSet, out, ind);
- exportToNamedMap(out, ind);
exportSetFieldValue(fieldSet, out, ind);
exportRemoveFieldValue(fieldSet, out, ind);
exportIterator(fieldSet, out, ind);
@@ -598,18 +597,6 @@ public class DocumentGenMojo extends AbstractMojo {
out.write(ind(ind)+"}\n\n");
}
- private static void exportToNamedMap(Writer out, int ind) throws IOException {
- // A helper to convert from SpanTree collection to Map. Can be removed if StringFieldValue is fixed to expose the map.
- out.write(
- ind()+"private static java.util.Map<java.lang.String,com.yahoo.document.annotation.SpanTree> toNamedMap(java.util.Collection<com.yahoo.document.annotation.SpanTree> coll) {\n" +
- ind(ind+1)+"if (coll==null) return null;\n" +
- ind(ind+1)+"java.util.Map<java.lang.String,com.yahoo.document.annotation.SpanTree> ret = new java.util.HashMap<java.lang.String,com.yahoo.document.annotation.SpanTree>();\n" +
- ind(ind+1)+"for (com.yahoo.document.annotation.SpanTree st : coll) ret.put(st.getName(), st);\n" +
- ind(ind+1)+"return ret;\n" +
- ind()+"}\n\n"
- );
- }
-
private static void exportHashCode(Collection<Field> fieldSet, Writer out, int ind, String hcBase) throws IOException {
out.write(ind(ind)+"@Override public int hashCode() {\n");
out.write(ind(ind+1)+"int hc = "+hcBase+";\n");