Currently clang-format would always emit a replacement for a block of Java imports even if it is correctly formatted:
% cat /tmp/Aggregator.java import X; % clang-format /tmp/Aggregator.java import X; % clang-format -output-replacements-xml /tmp/Aggregator.java <?xml version='1.0'?> <replacements xml:space='preserve' incomplete_format='false'> <replacement offset='0' length='9'>import X;</replacement> </replacements> %
This change makes clang-format not emit replacements in this case. Note that
there is logic to not emit replacements in this case for C++.