BytecodeAnalysis refactoring: HKey and Key merged to EKey; hashing is encapsulated inside HMethod/Method pair

This commit is contained in:
Tagir Valeev
2017-05-30 13:16:31 +07:00
parent 016bb9866b
commit 97eaee737b
31 changed files with 662 additions and 1010 deletions

View File

@@ -281,7 +281,6 @@
</item>
<item name='java.io.File java.lang.String slashify(java.lang.String, boolean)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;!null,_-&gt;!null&quot;"/>
<val name="pure" val="true"/>
</annotation>
</item>

View File

@@ -343,11 +343,6 @@
<item name='java.lang.invoke.BoundMethodHandle java.lang.RuntimeException badBoundArgumentException(java.lang.Object, java.lang.invoke.MethodHandle, int) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.lang.invoke.BoundMethodHandle java.lang.String noParens(java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.lang.invoke.BoundMethodHandle java.lang.String noParens(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -486,11 +486,6 @@
<val val="&quot;!null-&gt;!null;null-&gt;null&quot;"/>
</annotation>
</item>
<item name='java.net.URI java.lang.String encode(java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.net.URI java.lang.String encode(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -537,11 +532,6 @@
<item name='java.net.URI java.lang.String normalize(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.net.URI java.lang.String quote(java.lang.String, long, long)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null,_,_-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.net.URI java.lang.String quote(java.lang.String, long, long) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -586,30 +576,15 @@
<item name='java.net.URI java.net.URI create(java.lang.String)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.net.URI java.net.URI normalize(java.net.URI)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.net.URI java.net.URI normalize(java.net.URI) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.net.URI java.net.URI parseServerAuthority()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.net.URI java.net.URI relativize(java.net.URI)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.net.URI java.net.URI relativize(java.net.URI) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.net.URI java.net.URI relativize(java.net.URI, java.net.URI)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;_,!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.net.URI java.net.URI relativize(java.net.URI, java.net.URI) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -1673,11 +1673,6 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.Collections.EmptyList T[] toArray(T[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.util.Collections.EmptyList T[] toArray(T[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -1861,11 +1856,6 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.Collections.EmptySet T[] toArray(T[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='java.util.Collections.EmptySet T[] toArray(T[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -3119,19 +3119,9 @@
<item name='org.apache.commons.lang.StringUtils java.lang.String chomp(java.lang.String, java.lang.String) 1'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String chompLast(java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String chompLast(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String chompLast(java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null,_-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String chompLast(java.lang.String, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -3217,11 +3207,6 @@
<item name='org.apache.commons.lang.StringUtils java.lang.String escape(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String getChomp(java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;_,!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String getChomp(java.lang.String, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -3451,11 +3436,6 @@
</annotation>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String prechomp(java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null,_-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.commons.lang.StringUtils java.lang.String prechomp(java.lang.String, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -285,17 +285,12 @@
</annotation>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.math.Fraction org.apache.commons.lang.math.Fraction add(org.apache.commons.lang.math.Fraction)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.commons.lang.math.Fraction org.apache.commons.lang.math.Fraction add(org.apache.commons.lang.math.Fraction) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.commons.lang.math.Fraction org.apache.commons.lang.math.Fraction addSub(org.apache.commons.lang.math.Fraction, boolean)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null,_-&gt;!null;_,false-&gt;!null&quot;"/>
<val val="&quot;_,false-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.commons.lang.math.Fraction org.apache.commons.lang.math.Fraction addSub(org.apache.commons.lang.math.Fraction, boolean) 0'>
@@ -359,11 +354,6 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.commons.lang.math.Fraction org.apache.commons.lang.math.Fraction subtract(org.apache.commons.lang.math.Fraction)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.commons.lang.math.Fraction org.apache.commons.lang.math.Fraction subtract(org.apache.commons.lang.math.Fraction) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -82,11 +82,6 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='org.apache.velocity.app.event.implement.IncludeRelativePath java.lang.String includeEvent(java.lang.String, java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null,_,_-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.velocity.app.event.implement.IncludeRelativePath java.lang.String includeEvent(java.lang.String, java.lang.String, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -34,11 +34,6 @@
<item name='org.apache.velocity.app.tools.VelocityFormatter java.lang.String formatVector(java.util.List, java.lang.String, java.lang.String) 2'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='org.apache.velocity.app.tools.VelocityFormatter java.lang.String limitLen(int, java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;_,!null,_-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.velocity.app.tools.VelocityFormatter java.lang.String limitLen(int, java.lang.String, java.lang.String) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -15,11 +15,6 @@
<item name='org.apache.velocity.convert.WebMacro boolean writeTemplate(java.lang.String, java.lang.String, java.lang.String) 2'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='org.apache.velocity.convert.WebMacro java.lang.String convertName(java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.velocity.convert.WebMacro java.lang.String convertName(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -32,11 +32,6 @@
<item name='org.apache.velocity.runtime.parser.Parser Parser(org.apache.velocity.runtime.RuntimeServices) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='org.apache.velocity.runtime.parser.Parser java.lang.String escapedDirective(java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.velocity.runtime.parser.Parser java.lang.String escapedDirective(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -169,11 +169,6 @@
</annotation>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='org.apache.velocity.util.StringUtils java.lang.String sub(java.lang.String, java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;!null,_,_-&gt;!null&quot;"/>
</annotation>
</item>
<item name='org.apache.velocity.util.StringUtils java.lang.String sub(java.lang.String, java.lang.String, java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -222,7 +222,7 @@ public class BytecodeAnalysisTest extends JavaCodeInsightFixtureTestCase {
*/
HKey psiKey = BytecodeAnalysisConverter.psiKey(psiMethod, Direction.Out, myMessageDigest);
EKey psiKey = BytecodeAnalysisConverter.psiKey(psiMethod, Direction.Out, myMessageDigest);
if (noKey) {
assertTrue(null == psiKey);
return;
@@ -230,7 +230,7 @@ public class BytecodeAnalysisTest extends JavaCodeInsightFixtureTestCase {
else {
assertFalse(null == psiKey);
}
HKey asmKey = BytecodeAnalysisConverter.asmKey(new Key(method, Direction.Out, true), myMessageDigest);
EKey asmKey = new EKey(method, Direction.Out, true).hashed(myMessageDigest);
Assert.assertEquals(asmKey, psiKey);
}