Bug 27517 - GiopRmicCompiler performs wrong check of thrown exceptions declaration
Summary: GiopRmicCompiler performs wrong check of thrown exceptions declaration
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: cp-tools (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Audrius Meškauskas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-09 10:26 UTC by Edwin Steiner
Modified: 2006-05-09 14:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Patch to fix thrown exceptions check (413 bytes, patch)
2006-05-09 10:28 UTC, Edwin Steiner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin Steiner 2006-05-09 10:26:13 UTC
When compiling JOnAS I got error messages from GiopRmicCompiler
complaining that a method does not throw RemoteException.

I checked and saw that the method actually _does_ throw RemoteException,
but also other exceptions.

The way the check is written in the source (see the "break") i suspect
the intended behaviour was to check if _any_ thrown exception class
is assignable to RemoteException. However, the current code checks
if _all_ thrown exception classes are assignable to RemoteException.

I attach a patch that changes the behaviour to the former. With this
patch (and one adding the -classpath argument to grmic) I was able
to compile JOnAS.
Comment 1 Edwin Steiner 2006-05-09 10:28:17 UTC
Created attachment 11420 [details]
Patch to fix thrown exceptions check

Patch that changes the check from "ALL thrown exceptions are RemoteExceptions"
to "AT LEAST ONE thrown exception is a RemoteException".
Comment 2 Mark Wielaard 2006-05-09 11:32:06 UTC
Audrius can you take a look at this? I believe Edwin's evaluation is correct.
Comment 3 Audrius Meškauskas 2006-05-09 14:19:52 UTC
For sure. Thanks a lot for reporting this.

2006-05-09  Audrius Meskauskas  <AudriusA@Bioinformatics.org>

	PR 27517
	* tools/gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java (compile): 
	Do not demand all thrown exceptions to be an instance of RemoteException.