Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Possible compiler error detecting whether or not an exception is ever thrown by a method
Possible compiler error detecting whether or not an exception is ever thrown by a method [message #154562] Sun, 09 November 2003 10:14 Go to next message
Eclipse UserFriend
The Eclipse compiler erroneously reports a warning that the declared
IOException is not actually thrown by the following function (if I
follow its advice and remove the declaration, javac reports an error).
It looks like the condition is that an exception is re-thrown in its
catch block.

private byte[] getSomeBytes(InputStream in, long length)
throws IOException
{
DataInputStream din = new DataInputStream(in);
byte[] bytes = new byte[(int)length];
try {
din.readFully(bytes);
} catch (IOException ex) {
MessageHandler.error(ex);
throw ex;
} finally {
return bytes;
}
}
Re: Possible compiler error detecting whether or not an exception is ever thrown by a method [message #154587 is a reply to message #154562] Sun, 09 November 2003 11:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: akiezun.cuthis.mit.edu.andthis

please report it to bugzilla (component is: JDT CORE)
(and use the jdt newsgroup for jdt-related questions, like this one)
a.
Re: Possible compiler error detecting whether or not an exception is ever thrown by a method [message #155531 is a reply to message #154587] Tue, 11 November 2003 12:42 Go to previous message
Eclipse UserFriend
adam kiezun wrote:
> please report it to bugzilla (component is: JDT CORE)
> (and use the jdt newsgroup for jdt-related questions, like this one)
> a.
>
>
Adam,

Thanks for your suggestion. I'm new to the group and didn't know
where else to post.
Previous Topic:Outline Page activation
Next Topic:Can a plugin extend a projects classpath?
Goto Forum:
  


Current Time: Wed Jul 16 15:26:21 EDT 2025

Powered by FUDForum. Page generated in 0.07887 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top