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]