small improvements to "Stream API call chain can be simplified" inspection messages

GitOrigin-RevId: 97de1fccf08a714baab42068fafcaa3db4c00edd
This commit is contained in:
Bas Leijdekkers
2022-01-31 10:13:16 +00:00
committed by intellij-monorepo-bot
parent 358239888b
commit 64b5b30b64
3 changed files with 6 additions and 6 deletions
@@ -31,7 +31,7 @@ Simplification will often avoid some temporary object creation during collection
<li><code>optional.orElseGet(() -> { throw new ...; })</code> &rarr; <code>optional.orElseThrow()</code></li>
</ul>
<p>
Note that the replacements semantic may have minor difference in some cases. For example,
Note that the replacement semantics may have minor differences in some cases. For example,
<code>Collections.synchronizedList(...).stream().forEach()</code> is not synchronized while
<code>Collections.synchronizedList(...).forEach()</code> is synchronized.
Also, <code>collect(Collectors.maxBy())</code> returns an empty <code>Optional</code> if the resulting element is
@@ -1,4 +1,4 @@
// "Merge with previous 'map' call" "false"
// "Merge with previous 'map()' call" "false"
import java.util.function.Function;
import java.util.stream.Stream;
@@ -1400,10 +1400,10 @@ simplify.stream.collection.creation.fix.name=Replace with ''{0}'' constructor
simplify.stream.simple.stream.of.fix.name.use.stream.element.explicitly=Use Stream element explicitly
simplify.stream.simple.stream.of.message=Unnecessary single-element Stream
simplify.stream.replace.with.element.iteration.fix.message=Can be replaced with element iteration
simplify.stream.remove.boolean.identity.fix.name=Merge with previous 'map' call
simplify.stream.remove.boolean.identity.fix.message=Can be merged with previous 'map' call
simplify.stream.replace.support.with.collection.fix.name=Replace with ''{0}.{1}'' call
simplify.stream.replace.support.with.collection.fix.message=Can be replaced with ''{0}.{1}'' call
simplify.stream.remove.boolean.identity.fix.name=Merge with previous 'map()' call
simplify.stream.remove.boolean.identity.fix.message=Can be merged with previous 'map()' call
simplify.stream.replace.support.with.collection.fix.name=Replace with ''{0}.{1}()'' call
simplify.stream.replace.support.with.collection.fix.message=Can be replaced with ''{0}.{1}()'' call
simplify.stream.swap.filter.and.map.fix.name=Swap 'filter()' and 'map()'
simplify.stream.swap.filter.and.map.fix.message='filter()' and 'map()' can be swapped
simplify.stream.inspection.iterate.take.while.fix.name=Replace with three-arg 'iterate()'