bugfixes; add NullPointerException.java

This commit is contained in:
Joel Dice 2007-07-23 21:31:28 -06:00
parent 823d764998
commit 527f46d53d
5 changed files with 34 additions and 15 deletions

View File

@ -0,0 +1,19 @@
package java.lang;
public class NullPointerException extends RuntimeException {
public NullPointerException(String message, Throwable cause) {
super(message, cause);
}
public NullPointerException(String message) {
this(message, null);
}
public NullPointerException(Throwable cause) {
this(null, cause);
}
public NullPointerException() {
this(null, null);
}
}

View File

@ -16,7 +16,7 @@ src = src
classpath = classpath
test = test
input = $(cls)/Reflection.class
input = $(cls)/Threads.class
cxx = g++
cc = gcc

View File

@ -2048,27 +2048,27 @@ resolveClass(Thread* t, object spec)
if (data) {
if (Verbose) {
fprintf(stderr, "parsing %s\n", &byteArrayBody
(t, spec, 0));
fprintf(stderr, "parsing %s\n", &byteArrayBody(t, spec, 0));
}
// parse class file
class_ = parseClass(t, data->start(), data->length());
data->dispose();
if (Verbose) {
fprintf(stderr, "done parsing %s\n", &byteArrayBody
(t, className(t, class_), 0));
}
if (LIKELY(t->exception == 0)) {
if (Verbose) {
fprintf(stderr, "done parsing %s\n", &byteArrayBody(t, spec, 0));
}
object bootstrapClass = hashMapFind
(t, t->vm->bootstrapClassMap, spec, byteArrayHash, byteArrayEqual);
object bootstrapClass = hashMapFind
(t, t->vm->bootstrapClassMap, spec, byteArrayHash, byteArrayEqual);
if (bootstrapClass) {
PROTECT(t, bootstrapClass);
if (bootstrapClass) {
PROTECT(t, bootstrapClass);
updateBootstrapClass(t, bootstrapClass, class_);
class_ = bootstrapClass;
updateBootstrapClass(t, bootstrapClass, class_);
class_ = bootstrapClass;
}
}
}
}

View File

@ -2132,7 +2132,7 @@ run(Thread* t)
pokeInt(t, t->frame + FrameIpOffset, t->ip);
for (; frame >= 0; frame = frameNext(t, frame)) {
if (frame <= base) {
if (frame < base) {
return 0;
}

View File

@ -212,7 +212,7 @@ class MySystem: public System {
}
virtual void dispose() {
assert(s, context == 0);
//assert(s, context == 0);
pthread_mutex_destroy(&mutex);
pthread_cond_destroy(&condition);
s->free(this);