Thanks Adrien. Just been trying with the <String,Integer> also and I think it's something to do with the ? and : because on its own final Map<String,Integer> segmentReaders0 = Collections.<String,Integer>emptyMap(); is fine but in the real use it gives a different error
[javac] ...branches\branch_5x\lucene\core\src\java\org\apache\lucene\index\StandardDirectoryReader.java:140: error: incompatible types: Map<? extends Object,? extends Object> cannot be converted to Map<String,Integer>
[javac] final Map<String,Integer> segmentReaders = (oldReaders == null ? Collections.<String,Integer>emptyMap() : new HashMap<>(oldReaders.size()));
and actually copying and pasting this, the ^ both in this and the previous error pointed in that direction also. Some parentheses should fix it then.