On 8/2/13 2:37 AM, Chris Hegarty wrote:
On 01/08/2013 22:18, Stuart Marks wrote:
SocketAddress overloads. Two of them were within methods that declared
"throws Exception." The third was within a try/catch block that catches
IOException. None of the three cases would suffer a source incompatibility.

I cannot comment on the code you are talking about, but removing 'throws SE'
from these constructors will affect anyone that is catching IOE ( since SE is a
subclass of IOE ). Simple test:  [...]

You're correct, of course, that constructing a new DatagramPacket within a try/catch of IOException would suffer the source incompatibility.

I had neglected to mention, though, that the try/catch(IOException) code that I looked at also did a bunch of other IOException-throwing stuff within the try block. So in that particular case the code wouldn't have had a compatibility issue.

This isn't definitive, of course, but it does seem to supply some
evidence that making this change would result in a relatively minor
source incompatibility.

Given the above, I still agree with the sentiment here. I will file a bug and
proceed with the necessary changes to remove SE.

Great! Glad to hear it. Thanks.

s'marks

Reply via email to