mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-21 14:37:45 +07:00
update tests and testdata to reflect newer mock jdk 1.7
This commit is contained in:
+11
-3
@@ -1,8 +1,16 @@
|
||||
import java.util.Calendar;
|
||||
|
||||
class Util {
|
||||
void foo() {
|
||||
Calendar.getInstance().get(Cale<caret>x)
|
||||
MyCalendar.getInstance().get(MyCale<caret>x)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class MyCalendar {
|
||||
static MyCalendar getInstance() {}
|
||||
|
||||
int get(int field) {}
|
||||
|
||||
public static final int FIELD_COUNT;
|
||||
public static final int AM;
|
||||
public static final int PM;
|
||||
}
|
||||
+3
-3
@@ -42,9 +42,9 @@ class C {
|
||||
mt = MethodType.methodType(java.util.List.class, Object[].class);
|
||||
mh = lookup.findStatic(java.util.Arrays.class, "asList", mt);
|
||||
assert(mh.isVarargsCollector());
|
||||
x = mh.invokeGeneric("one", "two");
|
||||
x = mh.invoke("one", "two");
|
||||
|
||||
// invokeGeneric(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
|
||||
// invoke(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
|
||||
assert(x.equals(java.util.Arrays.asList("one","two")));
|
||||
|
||||
// mt is (Object,Object,Object)Object
|
||||
@@ -68,7 +68,7 @@ class C {
|
||||
// invokeExact(Ljava/io/PrintStream;Ljava/lang/String;)V
|
||||
|
||||
MethodHandle mh0 = lookup.findVirtual(String.class, "length", MethodType.methodType(int.class));
|
||||
MethodHandle mh1 = MethodHandles.convertArguments(mh0, MethodType.methodType(Integer.class, String.class));
|
||||
MethodHandle mh1 = mh0.asType(MethodType.methodType(Integer.class, String.class));
|
||||
System.out.println((Integer) mh1.invokeExact("daddy"));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ implements <a href="psi_element://java.io.Serializable"><code>java.io.Serializab
|
||||
individual characters of the sequence, for comparing strings, for
|
||||
searching strings, for extracting substrings, and for creating a
|
||||
copy of a string with all characters translated to uppercase or to
|
||||
lowercase. Case mapping is based on the Unicode Standard version
|
||||
lowercase. Case mapping is based on the Unicode Standard version
|
||||
specified by the <a href="psi_element://java.lang.Character"><code>Character</code></a> class.
|
||||
<p>
|
||||
The Java language provides special support for the string
|
||||
|
||||
+1
-2
@@ -5,10 +5,9 @@ public abstract boolean <b>contains</b>(<a href="psi_element://java.la
|
||||
<li><i>@<a href="psi_element://org.jetbrains.annotations.Contract"><code>org.jetbrains.annotations.Contract</code></a>(pure = true)</i></li>
|
||||
</ul>
|
||||
|
||||
|
||||
Returns <tt>true</tt> if this list contains the specified element.
|
||||
More formally, returns <tt>true</tt> if and only if this list contains
|
||||
at least one element <tt>e</tt> such that
|
||||
<tt>(o==null ? e==null : o.equals(e))</tt>.
|
||||
|
||||
<DD><DL><DT><b>Overrides:</b><DD><a href="psi_element://java.util.Collection#contains(java.lang.Object)"><code>contains</code></a> in interface <a href="psi_element://java.util.Collection"><code>Collection</code></a></DD></DL></DD><DD><DL><DT><b>Parameters:</b><DD><code>o</code> - element whose presence in this list is to be tested. </DD></DL></DD><DD><DL><DT><b>Returns:</b><DD><tt>true</tt> if this list contains the specified element. </DD></DL></DD><DD><DL><DT><b>Throws:</b><DD><a href="psi_element://java.lang.ClassCastException"><code>ClassCastException</code></a> - if the type of the specified element is incompatible with this list (optional). <DD><a href="psi_element://java.lang.NullPointerException"><code>NullPointerException</code></a> - if the specified element is null and this list does not support null elements (optional).</DD></DL></DD></body></html>
|
||||
<DD><DL><DT><b>Overrides:</b><DD><a href="psi_element://java.util.Collection#contains(java.lang.Object)"><code>contains</code></a> in interface <a href="psi_element://java.util.Collection"><code>Collection</code></a></DD></DL></DD><DD><DL><DT><b>Parameters:</b><DD><code>o</code> - element whose presence in this list is to be tested </DD></DL></DD><DD><DL><DT><b>Returns:</b><DD><tt>true</tt> if this list contains the specified element </DD></DL></DD><DD><DL><DT><b>Throws:</b><DD><a href="psi_element://java.lang.ClassCastException"><code>ClassCastException</code></a> - if the type of the specified element is incompatible with this list (<a href="psi_element://java.util.Collection###optional-restrictions">optional</a>) <DD><a href="psi_element://java.lang.NullPointerException"><code>NullPointerException</code></a> - if the specified element is null and this list does not permit null elements (<a href="psi_element://java.util.Collection###optional-restrictions">optional</a>)</DD></DL></DD></body></html>
|
||||
+5
-5
@@ -5,9 +5,9 @@ boolean <b>contains</b>(<a href="psi_element://java.lang.Object"><code>Obje
|
||||
<li><i>@<a href="psi_element://org.jetbrains.annotations.Contract"><code>org.jetbrains.annotations.Contract</code></a>(pure = true)</i></li>
|
||||
</ul>
|
||||
<DD><DL><DT><b>Description copied from interface:</b> <a href="psi_element://java.util.Collection"><code>java.util.Collection</code></a><br>
|
||||
Returns <tt>true</tt> if this collection contains the specified
|
||||
element. More formally, returns <tt>true</tt> if and only if this
|
||||
collection contains at least one element <tt>e</tt> such that
|
||||
<tt>(o==null ? e==null : o.equals(e))</tt>.
|
||||
Returns <tt>true</tt> if this collection contains the specified element.
|
||||
More formally, returns <tt>true</tt> if and only if this collection
|
||||
contains at least one element <tt>e</tt> such that
|
||||
<tt>(o==null ? e==null : o.equals(e))</tt>.
|
||||
|
||||
</DD></DL></DD><DD><DL><DT><b>Overrides:</b><DD><a href="psi_element://java.util.Collection#contains(java.lang.Object)"><code>contains</code></a> in interface <a href="psi_element://java.util.Collection"><code>Collection</code></a><DD><a href="psi_element://I#contains(java.lang.Object)"><code>contains</code></a> in interface <a href="psi_element://I"><code>I</code></a></DD></DL></DD><DD><DL><DT><b>Parameters:</b><DD><code>o</code> - element whose presence in this collection is to be tested. </DD></DL></DD><DD><DL><DT><b>Returns:</b><DD><tt>true</tt> if this collection contains the specified element </DD></DL></DD><DD><DL><DT><b>Throws:</b><DD><a href="psi_element://java.lang.ClassCastException"><code>ClassCastException</code></a> - if the type of the specified element is incompatible with this collection (optional). <DD><a href="psi_element://java.lang.NullPointerException"><code>NullPointerException</code></a> - if the specified element is null and this collection does not support null elements (optional).</DD></DL></DD></body></html>
|
||||
</DD></DL></DD><DD><DL><DT><b>Overrides:</b><DD><a href="psi_element://java.util.Collection#contains(java.lang.Object)"><code>contains</code></a> in interface <a href="psi_element://java.util.Collection"><code>Collection</code></a><DD><a href="psi_element://I#contains(java.lang.Object)"><code>contains</code></a> in interface <a href="psi_element://I"><code>I</code></a></DD></DL></DD><DD><DL><DT><b>Parameters:</b><DD><code>o</code> - element whose presence in this collection is to be tested </DD></DL></DD><DD><DL><DT><b>Returns:</b><DD><tt>true</tt> if this collection contains the specified element </DD></DL></DD><DD><DL><DT><b>Throws:</b><DD><a href="psi_element://java.lang.ClassCastException"><code>ClassCastException</code></a> - if the type of the specified element is incompatible with this collection (<a href="psi_element://My###optional-restrictions">optional</a>) <DD><a href="psi_element://java.lang.NullPointerException"><code>NullPointerException</code></a> - if the specified element is null and this collection does not permit null elements (<a href="psi_element://My###optional-restrictions">optional</a>)</DD></DL></DD></body></html>
|
||||
Reference in New Issue
Block a user