Commit 082a12bc by Mark Wielaard

natClass.cc (_Jv_CheckCast): add class names to exception

* java/lang/natClass.cc (_Jv_CheckCast): add class names to exception
* gnu/gcj/runtime/FirstThread.java (main): replace / with . in jarMainClassName

From-SVN: r40604
parent bf501a65
2001-03-18 Mark Wielaard <mark@klomp.org>
* java/lang/natClass.cc (_Jv_CheckCast): add class names to exception
2001-03-18 Mark Wielaard <mark@klomp.org>
* gnu/gcj/runtime/FirstThread.java (main): replace / with . in
jarMainClassName
2001-03-17 Tom Tromey <tromey@redhat.com> 2001-03-17 Tom Tromey <tromey@redhat.com>
* java/lang/natString.cc (rehash): Don't bother with memset; * java/lang/natString.cc (rehash): Don't bother with memset;
...@@ -32,12 +41,14 @@ ...@@ -32,12 +41,14 @@
Only try to print the subordinate stack trace if "exception" is set. Only try to print the subordinate stack trace if "exception" is set.
Print our class name first. Print our class name first.
>>>>>>> 1.710
2001-03-08 Tom Tromey <tromey@redhat.com> 2001-03-08 Tom Tromey <tromey@redhat.com>
* java/io/ObjectStreamClass.java (setUID): Don't write interface * java/io/ObjectStreamClass.java (setUID): Don't write interface
info for array classes. info for array classes.
Fixes PR libgcj/1971. Fixes PR libgcj/1971.
>>>>>>> 1.707
2001-03-06 Bryce McKinlay <bryce@albatross.co.nz> 2001-03-06 Bryce McKinlay <bryce@albatross.co.nz>
* java/util/TreeSet.java (writeObject): Use a for-loop instead of * java/util/TreeSet.java (writeObject): Use a for-loop instead of
...@@ -50,6 +61,7 @@ ...@@ -50,6 +61,7 @@
back-porting the classes to JDK1.1 trivial. back-porting the classes to JDK1.1 trivial.
(readObject): likewise. (readObject): likewise.
>>>>>>> 1.706
2001-03-01 Per Bothner <per@bothner.com> 2001-03-01 Per Bothner <per@bothner.com>
Changes merged from Kawa's gnu.math. Changes merged from Kawa's gnu.math.
...@@ -124,6 +136,7 @@ ...@@ -124,6 +136,7 @@
which are alive. which are alive.
(enumerate): Likewise. (enumerate): Likewise.
>>>>>>> 1.705
2001-02-19 Bryce McKinlay <bryce@albatross.co.nz> 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/Integer.java (getInteger): Return default argument if * java/lang/Integer.java (getInteger): Return default argument if
...@@ -135,6 +148,7 @@ ...@@ -135,6 +148,7 @@
(ready): Return false if no more characters can be read. (ready): Return false if no more characters can be read.
* java/io/ByteArrayInputStream.java (ByteArrayInputStream): Likewise. * java/io/ByteArrayInputStream.java (ByteArrayInputStream): Likewise.
>>>>>>> 1.696
2001-02-17 Mark Wielaard <mark@klomp.org> 2001-02-17 Mark Wielaard <mark@klomp.org>
* java/util/TimerTask.java: New version from Classpath. * java/util/TimerTask.java: New version from Classpath.
......
...@@ -56,8 +56,10 @@ final class FirstThread extends Thread ...@@ -56,8 +56,10 @@ final class FirstThread extends Thread
jarMainClassName = a.getValue(Attributes.Name.MAIN_CLASS); jarMainClassName = a.getValue(Attributes.Name.MAIN_CLASS);
if (jarMainClassName != null) if (jarMainClassName != null)
{
jarMainClassName = jarMainClassName.replace('/','.');
return; return;
}
} catch (Exception e) { } catch (Exception e) {
// empty // empty
} }
......
...@@ -983,7 +983,12 @@ _Jv_CheckCast (jclass c, jobject obj) ...@@ -983,7 +983,12 @@ _Jv_CheckCast (jclass c, jobject obj)
{ {
if (__builtin_expect if (__builtin_expect
(obj != NULL && ! _Jv_IsAssignableFrom(c, JV_CLASS (obj)), false)) (obj != NULL && ! _Jv_IsAssignableFrom(c, JV_CLASS (obj)), false))
JvThrow (new java::lang::ClassCastException); JvThrow (new java::lang::ClassCastException
((new java::lang::StringBuffer
(obj->getClass()->getName()))->append
(JvNewStringUTF(" cannot be cast to "))->append
(c->getName())->toString()));
return obj; return obj;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment