ecj compiler is loaded from the common-build here: https://github.com/apache/lucene-solr/blob/master/lucene/common-build.xml#L2099
Looks like the compiler is a little out of date: it uses 4.4.1 but looking at maven it seems 4.6.1 is the latest one. Maybe try bumping it to see if it addresses your issue? On Tue, Aug 14, 2018 at 2:55 PM, Erick Erickson <[email protected]> wrote: > OK, so I'm trying to get modern and used the following construct to > initialize a map: > > static final Map<TEST_TYPE, String> solrClassMap = > Collections.unmodifiableMap(Stream.of( > new SimpleEntry<>(TEST_TYPE.TINT, "solr.TrieIntField"), > new SimpleEntry<>(TEST_TYPE.BOOL, "solr.BoolField")) > .collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()))); > > This compiles and runs just fine, but fails the precommit step > with:"Type mismatch: cannot convert from Map<Object,Object> to > Map<TestFieldType.TEST_TYPE,String>" (See below). > > Seems like a bogus failure on ejc-lint? Any workarounds you can recommend? > > > [ecj-lint] static final Map<TEST_TYPE, String> solrClassMap = > Collections.unmodifiableMap(Stream.of( > [ecj-lint] new SimpleEntry<>(TEST_TYPE.TINT, "solr.TrieIntField"), > [ecj-lint] new SimpleEntry<>(TEST_TYPE.BOOL, "solr.BoolField")) > [ecj-lint] .collect(Collectors.toMap((e) -> e.getKey(), (e) -> > e.getValue()))); > [ecj-lint] > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > [ecj-lint] Type mismatch: cannot convert from Map<Object,Object> to > Map<TestFieldType.TEST_TYPE,String> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
