Minor clean up and bug fix.

From-SVN: r32196
This commit is contained in:
Anthony Green 2000-02-26 21:12:54 +00:00 committed by Anthony Green
parent 701a26019c
commit e1b1511329
4 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2000-02-26 Anthony Green <green@cygnus.com>
* gnu/gcj/io/MimeTypes.java: Test for null.
* jni.cc (_Jv_JNI_AttachCurrentThread): Minor cleanup.
(JNI_GetCreatedJavaVMs): Remove compiler warning.
* java/net/URLConnection.java: Update copyright notice.
2000-02-25 Tom Tromey <tromey@cygnus.com>
* jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on

View File

@ -36,7 +36,7 @@ public class MimeTypes
{
// Read the next extension
String e = tokenizer.nextToken ();
if (! e.startsWith ("#"))
if ((e != null) && (! e.startsWith ("#")))
table.put (e, t);
else
break;

View File

@ -1,7 +1,7 @@
// URLConnection.java - Superclass of all communications links between
// an application and a URL.
/* Copyright (C) 1999 Red Hat, Inc.
/* Copyright (C) 1999, 2000 Red Hat, Inc.
This file is part of libgcj.

View File

@ -1545,8 +1545,7 @@ _Jv_JNI_AttachCurrentThread (JavaVM *, jstring name, void **penv, void *args)
// have been called simply to set the new JNIEnv.
if (_Jv_ThreadCurrent () == NULL)
{
java::lang::Thread *t = new gnu::gcj::jni::NativeThread (group, name);
t = t; // Avoid compiler warning. Eww.
(void) new gnu::gcj::jni::NativeThread (group, name);
}
_Jv_SetCurrentJNIEnv (env);
@ -1707,7 +1706,7 @@ JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args)
}
jint
JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize buf_len, jsize *n_vms)
JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize /* buf_len */, jsize *n_vms)
{
JvAssert (buf_len > 0);
// We only support a single VM.