mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
Collection.size() is pure now
GitOrigin-RevId: 38ffe33c688113972126220352035f26aeb189b3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
10f42f8520
commit
7aa14d5655
@@ -1,9 +1,12 @@
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.Map;
|
||||
|
||||
class Temp {
|
||||
public Object foo(Set<String> bar) {
|
||||
class Set {
|
||||
native Object size();
|
||||
}
|
||||
|
||||
public Object foo(Set bar) {
|
||||
if (bar.size() < 2)
|
||||
return <caret>abortWithCorruptDataError("" + bar.size()); // Inline this
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
class Temp {
|
||||
public Object foo(Set<String> bar) {
|
||||
class Set {
|
||||
native Object size();
|
||||
}
|
||||
|
||||
public Object foo(Set bar) {
|
||||
if (bar.size() < 2) {
|
||||
// Inline this
|
||||
bar.size(); // or online this
|
||||
|
||||
@@ -1625,6 +1625,11 @@
|
||||
<item name="java.util.Collection boolean retainAll(java.util.Collection<?>) 0">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
</item>
|
||||
<item name='java.util.Collection int size()'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name="java.util.Collection java.lang.Object[] toArray()">
|
||||
<annotation name="org.jetbrains.annotations.NotNull" />
|
||||
<annotation name='org.intellij.lang.annotations.Flow'>
|
||||
|
||||
Reference in New Issue
Block a user