mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more inspection description cleanup
This commit is contained in:
@@ -7,6 +7,6 @@ Reports anonymous classes which could be transformed to constructor or factory m
|
||||
<li><b>Thread</b> anonymous classes having <b>run()</b> method (could be replaced with <b>new Thread(Runnable)</b></li>
|
||||
</ul>
|
||||
<!-- tooltip end -->
|
||||
<p><small>New in 2016.3</small>
|
||||
<p><small>New in 2016.3</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<body>
|
||||
Inspection looks for Comparators defined as lambda expressions which could be expressed using
|
||||
Reports Comparators defined as lambda expressions which could be expressed using
|
||||
methods like <code>Comparator.comparing()</code>.
|
||||
<p>Some comparators like <code>(person1, person2) -> person1.getName().compareTo(person2.getName())</code>
|
||||
could be simplified like this: <code>Comparator.comparing(Person::getName)</code>.</p>
|
||||
<!-- tooltip end -->
|
||||
<p><small>New in 2016.3</small>
|
||||
<p><small>New in 2016.3</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection warns if trivial lambda expression is used where there's an alternative method which behaves the same way but
|
||||
accepts concrete value instead of lambda.
|
||||
Reports if trivial lambda expression is used where there's an alternative method which behaves the same way, but
|
||||
accepts a concrete value instead of a lambda.
|
||||
<p>
|
||||
For example, <code>Optional.orElseGet(() -> null)</code> can be replaced with <code>Optional.orElse(null)</code>.
|
||||
</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection reports method references mapped to Comparator interface which don't fulfill its contract.
|
||||
Reports method references mapped to Comparator interface which don't fulfill its contract.
|
||||
<p>
|
||||
Some method references like <code>Integer::max</code> can be mapped to <code>Comparator</code> interface.
|
||||
However using them as <code>Comparator</code> is useless and result might be unpredictable.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection looks for loops which could be replaced with <code>Arrays.setAll()</code> call.
|
||||
<p>The loops like this are reported:</p>
|
||||
Reports loops which could be replaced with <code>Arrays.setAll()</code> call.
|
||||
<p>For example:</p>
|
||||
<pre>
|
||||
for (int i=0; i<array.length; i++) {
|
||||
array[i] = calc(i);
|
||||
@@ -9,6 +9,6 @@ This inspection looks for loops which could be replaced with <code>Arrays.setAll
|
||||
</pre>
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the project or module is configured to use a language level of 8 or higher.</p>
|
||||
<p><small>New in 2017.1</small>
|
||||
<p><small>New in 2017.1</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
The inspection reports the loops which could be collapsed into single <code>Collection.removeIf</code> call.
|
||||
<p>The loops like this are reported:</p>
|
||||
Reports loops which could be collapsed into single <code>Collection.removeIf</code> call.
|
||||
<p>For example:</p>
|
||||
<pre>
|
||||
for (Iterator<String> it = collection.iterator(); it.hasNext(); ) {
|
||||
String aValue = it.next();
|
||||
@@ -12,6 +12,6 @@ The inspection reports the loops which could be collapsed into single <code>Coll
|
||||
</pre>
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the project or module is configured to use a language level of 8 or higher.</p>
|
||||
<small>New in 2016.3</small>
|
||||
<p><small>New in 2016.3</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
Inspection detects calls to <code>Collections.sort(list, comparator)</code> which could be replaced with <code>list.sort(comparator)</code>.
|
||||
Reports calls to <code>Collections.sort(list, comparator)</code> which could be replaced with <code>list.sort(comparator)</code>.
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the project or module is configured to use a language level of 8 or higher.</p>
|
||||
<p><small>New in 2016.3</small>
|
||||
<p><small>New in 2016.3</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
Inspection detects calls to <code>Map.get</code> which could be replaced with <code>getOrDefault</code>, <code>computeIfAbsent</code> or
|
||||
<code>putIfAbsent</code>.
|
||||
Reports calls to <code>Map.get()</code> which could be replaced with <code>getOrDefault()</code>, <code>computeIfAbsent()</code> or
|
||||
<code>putIfAbsent()</code>.
|
||||
<ul>
|
||||
<li><b>Map.getOrDefault</b> method could be used to replace the code like this:
|
||||
<pre>
|
||||
@@ -30,6 +30,6 @@ Inspection detects calls to <code>Map.get</code> which could be replaced with <c
|
||||
</ul>
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the project or module is configured to use a language level of 8 or higher.</p>
|
||||
<p><small>New in 2016.3</small>
|
||||
<p><small>New in 2016.3</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection suggests to replace <code>for(Entry<?,?> entry : map.entrySet()) {...}</code> or
|
||||
Suggests to replace <code>for(Entry<?,?> entry : map.entrySet()) {...}</code> or
|
||||
<code>map.entrySet().forEach(entry -> ...)</code> with <code>map.forEach((key, value) -> ...)</code>.
|
||||
<p>
|
||||
When checkbox is checked, only <code>entrySet().forEach()</code> cases will be reported.
|
||||
@@ -8,6 +8,6 @@ This inspection suggests to replace <code>for(Entry<?,?> entry : map.entry
|
||||
</p>
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the project or module is configured to use a language level of 8 or higher.</p>
|
||||
<p><small>New in 2017.1</small>
|
||||
<p><small>New in 2017.1</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,6 +4,6 @@ Reports lambda expressions which could be replaced with JDK method call.
|
||||
<p>For example, the expression <code>x -> x</code> of type <code>Function<T, T></code>
|
||||
could be replaced with <code>Function.identity()</code> call.</p>
|
||||
<!-- tooltip end -->
|
||||
<p><small>New in 2017.1</small>
|
||||
<p><small>New in 2017.1</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection warns about useless Stream or Optional calls like <code>map(x -> x)</code> or <code>filter(x -> true)</code>,
|
||||
Reports useless Stream or Optional calls like <code>map(x -> x)</code> or <code>filter(x -> true)</code>,
|
||||
useless <code>sorted</code> or <code>distinct</code>.
|
||||
<p>Note that a mapping operation in code like <code>streamOfIntegers.map(Integer::valueOf)</code> works as <code>requireNonNull</code>
|
||||
check:
|
||||
@@ -8,6 +8,6 @@ useless <code>sorted</code> or <code>distinct</code>.
|
||||
"Report useless boxing in Stream.map" checkbox if you don't want such cases to be reported.</p>
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the project or module is configured to use a language level of 8 or higher.</p>
|
||||
<p><small>New in 2017.1</small>
|
||||
<p><small>New in 2017.1</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection detects collectors which could be simplified. In particular some cascaded <code>groupingBy</code> collectors
|
||||
Reports collectors which could be simplified. In particular some cascaded <code>groupingBy</code> collectors
|
||||
could be expressed with simpler <code>toMap</code> collector which also will likely be more performant.
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the project or module is configured to use a language level of 8 or higher. </p>
|
||||
<p><small>New in 2017.1</small>
|
||||
<p><small>New in 2017.1</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,12 +1,12 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection converts Stream API chain into classical loop.
|
||||
Finds Stream API chains and provides quick fix to convert them into classical loops.
|
||||
<p>
|
||||
Note that sometimes this inspection might cause slight semantic changes.
|
||||
Especially care should be taken when it comes to short-circuiting, as it's not specified how many elements will be actually read when
|
||||
Special care should be taken when it comes to short-circuiting, as it's not specified how many elements will be actually read when
|
||||
the stream short-circuits.
|
||||
</p>
|
||||
<!-- tooltip end -->
|
||||
<p><small>New in 2017.1</small>
|
||||
<p><small>New in 2017.1</small></p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user