Introduced AggressiveHardCodedPurity under registry key (IDEA-CR-21434)

New key = java.annotations.inference.aggressive.hardcoded.purity (true
by default). Implies purity for Object.toString(), Iterable.iterator(),
Iterator.hasNext() and this-changing Iterator.next(). Parameter-changing
 mode supported for hardcoded purity.
This commit is contained in:
Tagir Valeev
2017-05-30 17:32:56 +07:00
parent adb5d93cee
commit 82da560c31
10 changed files with 237 additions and 67 deletions

View File

@@ -51,6 +51,11 @@
<item name='org.apache.commons.collections.ExtendedProperties java.lang.String unescape(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.collections.ExtendedProperties java.util.Iterator getKeys()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.collections.ExtendedProperties org.apache.commons.collections.ExtendedProperties convertProperties(java.util.Properties) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -1543,6 +1543,11 @@
<item name='org.apache.commons.lang.CharSet CharSet(java.lang.String[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.CharSet boolean contains(char)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.CharSet boolean equals(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
@@ -3315,7 +3320,8 @@
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String join(java.util.Collection, char)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;null,_-&gt;null&quot;"/>
<val name="value" val="&quot;null,_-&gt;null&quot;"/>
<val name="pure" val="true"/>
</annotation>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
@@ -3324,7 +3330,8 @@
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String join(java.util.Collection, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;null,_-&gt;null&quot;"/>
<val name="value" val="&quot;null,_-&gt;null&quot;"/>
<val name="pure" val="true"/>
</annotation>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
@@ -4137,9 +4144,19 @@
<item name='org.apache.commons.lang.Validate void noNullElements(java.lang.Object[], java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.Validate void noNullElements(java.util.Collection, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -90,6 +90,11 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.anakia.NodeList java.util.Iterator iterator()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.anakia.NodeList java.util.List getList()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>

View File

@@ -23,6 +23,26 @@
<item name='org.apache.velocity.app.event.EventCartridge boolean removeEventHandler(org.apache.velocity.app.event.EventHandler) 0'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='org.apache.velocity.app.event.EventCartridge java.util.Iterator getIncludeEventHandlers()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.app.event.EventCartridge java.util.Iterator getInvalidReferenceEventHandlers()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.app.event.EventCartridge java.util.Iterator getMethodExceptionEventHandlers()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.app.event.EventCartridge java.util.Iterator getNullSetEventHandlers()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.app.event.EventCartridge java.util.Iterator getReferenceInsertionEventHandlers()'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>