Skip to content

Commit 683b5a4

Browse files
Unit test to show can load java.lang.Object
1 parent 05a7b4a commit 683b5a4

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed
Binary file not shown.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package java.lang;
2+
3+
public class Object {
4+
public final Class<?> getClass() {
5+
return null;
6+
}
7+
8+
public int hashCode() { return 0; }
9+
10+
public boolean equals(Object obj) { return (this == obj); }
11+
12+
protected Object clone() throws CloneNotSupportedException {
13+
throw new CloneNotSupportedException();
14+
}
15+
16+
public String toString() { return "object"; }
17+
18+
public final void notify() {}
19+
20+
public final void notifyAll() {}
21+
22+
public final void wait(long timeout) throws InterruptedException {
23+
throw new InterruptedException();
24+
}
25+
26+
public final void wait(long timeout, int nanos) throws InterruptedException {
27+
wait(timeout);
28+
}
29+
30+
public final void wait() throws InterruptedException { wait(0); }
31+
32+
protected void finalize() throws Throwable { }
33+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
KNOWNBUG
2+
java/lang/Object.class
3+
4+
^EXIT=6$
5+
^SIGNAL=0$
6+
^the program has no entry point$
7+
--
8+
^failed to add class symbol java::java\.lang\.Object$

0 commit comments

Comments
 (0)