Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-5512: remove redundant typing (diamond operator)

Steven Rowe152a11918cf7
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/htmlentity.py b/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/htmlentity.py
index 8a080b9da3b..9580abc00c6 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/htmlentity.py
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/htmlentity.py
@@ -51,7 +51,7 @@ def main():
print '%{'
print ' private static final Map<String,String> upperCaseVariantsAccepted'
- print ' = new HashMap<String,String>();'
+ print ' = new HashMap<>();'
print ' static {'
print ' upperCaseVariantsAccepted.put("quot", "QUOT");'
print ' upperCaseVariantsAccepted.put("copy", "COPY");'
@@ -61,7 +61,7 @@ def main():
print ' upperCaseVariantsAccepted.put("amp", "AMP");'
print ' }'
print ' private static final CharArrayMap<Character> entityValues'
- print ' = new CharArrayMap<Character>(Version.LUCENE_CURRENT, %i, false);' % len(keys)
+ print ' = new CharArrayMap<>(Version.LUCENE_CURRENT, %i, false);' % len(keys)
print ' static {'
print ' String[] entities = {'
output_line = ' '