mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
[java-analysis] Hard-code that Throwable.initCause is mutates_this
This allows contract inference for methods like AssertionError(Object) constructor. Fixes IDEA-260003 A warning is shown when Optional.get is called even when Optional.isPresent is verified before GitOrigin-RevId: 548008f5462b828e0346f089474182f59ec39bd1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
13f648a693
commit
c5c09c693a
@@ -245,6 +245,11 @@
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.lang.AssertionError AssertionError(java.lang.Object)'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.lang.AssertionError AssertionError(java.lang.Object) 0'>
|
||||
<annotation name='org.jetbrains.annotations.Nullable'/>
|
||||
</item>
|
||||
@@ -4018,6 +4023,9 @@
|
||||
<annotation name='org.jetbrains.annotations.Nullable'/>
|
||||
</item>
|
||||
<item name='java.lang.Throwable java.lang.Throwable initCause(java.lang.Throwable)'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="mutates" val=""this""/>
|
||||
</annotation>
|
||||
<annotation name='org.jetbrains.annotations.NotNull'/>
|
||||
</item>
|
||||
<item name='java.lang.Throwable void addSuppressed(java.lang.Throwable) 0'>
|
||||
|
||||
@@ -567,6 +567,11 @@
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.lang.invoke.MemberName boolean referenceKindIsConsistentWith(int)'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.lang.invoke.MemberName boolean testAllFlags(int)'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
@@ -1307,7 +1312,8 @@
|
||||
</item>
|
||||
<item name='java.lang.invoke.MethodHandleStatics java.lang.Error NYI()'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val val=""->fail""/>
|
||||
<val name="value" val=""->fail""/>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.lang.invoke.MethodHandleStatics java.lang.Error uncaughtException(java.lang.Throwable)'>
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
<root>
|
||||
<item name='java.rmi.RemoteException RemoteException()'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.rmi.RemoteException RemoteException(java.lang.String)'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.rmi.RemoteException RemoteException(java.lang.String, java.lang.Throwable)'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
<item name='java.rmi.RemoteException java.lang.Throwable getCause()'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
|
||||
Reference in New Issue
Block a user