This commit is contained in:
Joel Dice 2007-08-19 14:24:26 -06:00
parent 59638543c7
commit 7a340fd8fb
4 changed files with 9 additions and 6 deletions

View File

@ -60,7 +60,10 @@ public abstract class URLStreamHandler {
} }
} }
if (url.getFile() != null) { if (url.getFile() != null) {
sb.append("/").append(url.getFile()); if (url.getHost() != null) {
sb.append("/");
}
sb.append(url.getFile());
} }
return sb.toString(); return sb.toString();
} }

View File

@ -282,19 +282,19 @@ Method_invoke(Thread* t, jclass, jobject method, jobject instance,
} }
jobject jobject
Array_getObject(Thread* t, jobject array, int index) Array_getObject(Thread* t, jclass, jobject array, int index)
{ {
return pushReference(t, objectArrayBody(t, *array, index)); return pushReference(t, objectArrayBody(t, *array, index));
} }
void void
Array_setObject(Thread* t, jobject array, int index, jobject value) Array_setObject(Thread* t, jclass, jobject array, int index, jobject value)
{ {
set(t, objectArrayBody(t, *array, index), (value ? *value : 0)); set(t, objectArrayBody(t, *array, index), (value ? *value : 0));
} }
jint jint
Array_getLength(Thread* t, jobject array) Array_getLength(Thread* t, jclass, jobject array)
{ {
if (LIKELY(array)) { if (LIKELY(array)) {
object a = *array; object a = *array;

View File

@ -1939,7 +1939,7 @@ byteArrayEqual(Thread* t, object a, object b)
inline uint32_t inline uint32_t
stringHash(Thread* t, object s) stringHash(Thread* t, object s)
{ {
if (stringHashCode(t, s) == 0) { if (stringHashCode(t, s) == 0 and stringLength(t, s)) {
object data = stringData(t, s); object data = stringData(t, s);
if (objectClass(t, data) if (objectClass(t, data)
== arrayBody(t, t->vm->types, Machine::ByteArrayType)) == arrayBody(t, t->vm->types, Machine::ByteArrayType))

View File

@ -1947,7 +1947,7 @@ run(Thread* t)
} goto loop; } goto loop;
case lneg: { case lneg: {
pushLong(t, - popInt(t)); pushLong(t, - popLong(t));
} goto loop; } goto loop;
case lookupswitch: { case lookupswitch: {