Refactoring: make "replace call with binary operator" an inspection
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
This inspection reports function calls that can be replaced with binary operators, especially comparison-related.
|
||||
Example: <code>2.compareTo(1) > 0</code> can be replaced by <code>2 > 1</code>.
|
||||
</body></html>
|
||||
@@ -1,4 +0,0 @@
|
||||
<html><body>
|
||||
This inspection reports equals() and compareTo() calls that can be replaced with binary comparison.
|
||||
Example: <code>2.compareTo(1) > 0</code> can be replaced by <code>2 > 1</code>.
|
||||
</body></html>
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
a + b
|
||||
a - b
|
||||
a * b
|
||||
a / b
|
||||
a % b
|
||||
a .. b
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
a.plus(b)
|
||||
a.minus(b)
|
||||
a.times(b)
|
||||
a.div(b)
|
||||
a.mod(b)
|
||||
a.rangeTo(b)
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention replaces any calls to infix operators
|
||||
(<code>plus</code>, <code>minus</code>, <code>div</code>, <code>times</code>, <code>mod</code>, <code>rangeTo</code>) with their respective infixes.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user