public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
* [Bug java/20302] New: Problem with sub classes with contructors with exceptions @ 2005-03-03 17:55 steve at netfuel dot com 2005-03-03 18:42 ` [Bug java/20302] " steve at netfuel dot com ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: steve at netfuel dot com @ 2005-03-03 17:55 UTC (permalink / raw) To: java-prs GCJ does not handle compilation of sub classes with out explicitly defined constructors to override the super class constructors when the constructors throw exceptions. [steve@helios steve]$ gcj Test.java -c Test.o Test.java: In class 'Test$1': Test.java: In constructor '(Test,java.io.ByteArrayInputStream)': Test.java:9: error: Exception 'java.io.IOException' must be caught, or it must be declared in the 'throws' clause of 'Test$1'. ObjectInputStream in = new ObjectInputStream(is) ^ Test.java:9: error: Exception 'java.io.StreamCorruptedException' must be caught, or it must be declared in the 'throws' clause of 'Test$1'. ObjectInputStream in = new ObjectInputStream(is) ^ 2 errors [steve@helios steve]$ gcj Test2.java -c Test2.o Test2.java: In class 'Test2': Test2.java: In constructor '()': Test2.java:3: error: Exception 'java.io.IOException' must be caught, or it must be declared in the 'throws' clause of 'Test2'. class Test2 extends ObjectInputStream ^ 1 error -- Summary: Problem with sub classes with contructors with exceptions Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: steve at netfuel dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions 2005-03-03 17:55 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com @ 2005-03-03 18:42 ` steve at netfuel dot com 2005-03-03 19:31 ` steve at netfuel dot com ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: steve at netfuel dot com @ 2005-03-03 18:42 UTC (permalink / raw) To: java-prs ------- Additional Comments From steve at netfuel dot com 2005-03-03 17:32 ------- Created an attachment (id=8317) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8317&action=view) Inner class test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions 2005-03-03 17:55 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com 2005-03-03 18:42 ` [Bug java/20302] " steve at netfuel dot com @ 2005-03-03 19:31 ` steve at netfuel dot com 2005-03-03 21:59 ` steve at netfuel dot com ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: steve at netfuel dot com @ 2005-03-03 19:31 UTC (permalink / raw) To: java-prs ------- Additional Comments From steve at netfuel dot com 2005-03-03 17:33 ------- Created an attachment (id=8318) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8318&action=view) Straigt sub class test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions 2005-03-03 17:55 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com 2005-03-03 18:42 ` [Bug java/20302] " steve at netfuel dot com 2005-03-03 19:31 ` steve at netfuel dot com @ 2005-03-03 21:59 ` steve at netfuel dot com 2005-03-03 22:17 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: steve at netfuel dot com @ 2005-03-03 21:59 UTC (permalink / raw) To: java-prs -- What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |critical http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions 2005-03-03 17:55 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com ` (2 preceding siblings ...) 2005-03-03 21:59 ` steve at netfuel dot com @ 2005-03-03 22:17 ` pinskia at gcc dot gnu dot org 2005-03-03 22:18 ` steve at netfuel dot com 2005-06-30 5:21 ` tromey at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-03-03 22:17 UTC (permalink / raw) To: java-prs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-03 18:42 ------- I think this is a dup of another bug, but I am too lazy to find the bug right now. -- What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal Keywords| |rejects-valid http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions 2005-03-03 17:55 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com ` (3 preceding siblings ...) 2005-03-03 22:17 ` pinskia at gcc dot gnu dot org @ 2005-03-03 22:18 ` steve at netfuel dot com 2005-06-30 5:21 ` tromey at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: steve at netfuel dot com @ 2005-03-03 22:18 UTC (permalink / raw) To: java-prs ------- Additional Comments From steve at netfuel dot com 2005-03-03 19:31 ------- I have looked for this bug and did not see one. 15501 is similar but is not the same problem or is a subset of the problems defined in my report. As my bug also affects any Extends with Exceptions defined in the super class constructor. The work around is to add the overrideing constructors and call super(..) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions 2005-03-03 17:55 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com ` (4 preceding siblings ...) 2005-03-03 22:18 ` steve at netfuel dot com @ 2005-06-30 5:21 ` tromey at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: tromey at gcc dot gnu dot org @ 2005-06-30 5:21 UTC (permalink / raw) To: java-prs ------- Additional Comments From tromey at gcc dot gnu dot org 2005-06-30 05:21 ------- Note that Test2.java actually is invalid code. Unlike anonymous constructors, implicit constructors are not given any special treatment when it comes to 'throws' clauses. Test.java is valid code and should not be rejected. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-06-30 05:21:01 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-06-30 5:21 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-03-03 17:55 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com 2005-03-03 18:42 ` [Bug java/20302] " steve at netfuel dot com 2005-03-03 19:31 ` steve at netfuel dot com 2005-03-03 21:59 ` steve at netfuel dot com 2005-03-03 22:17 ` pinskia at gcc dot gnu dot org 2005-03-03 22:18 ` steve at netfuel dot com 2005-06-30 5:21 ` tromey at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).