|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (NET-208) TelnetInputStream swallows interruptedexception as IOExceptionTelnetInputStream swallows interruptedexception as IOException
-------------------------------------------------------------- Key: NET-208 URL: https://issues.apache.org/jira/browse/NET-208 Project: Commons Net Issue Type: Bug Affects Versions: 1.4 Reporter: Jan Van Besien The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: catch (InterruptedException e) { throw new IOException("Fatal thread interruption during read.", e); } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582212#action_12582212 ] Joerg Schaible commented on NET-208: ------------------------------------ Maybe it is a better choice to throw an java.io.InterruptedIOException instead. Such an exception may be thrown anyway (depending on the platform in use). > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Issue Comment Edited: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582212#action_12582212 ] joehni edited comment on NET-208 at 3/26/08 2:51 AM: ------------------------------------------------------------- Maybe it is a better choice to throw an java.io.InterruptedIOException instead. Such an exception might be thrown anyway (depending on the platform in use). was (Author: joehni): Maybe it is a better choice to throw an java.io.InterruptedIOException instead. Such an exception may be thrown anyway (depending on the platform in use). > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582240#action_12582240 ] Jan Van Besien commented on NET-208: ------------------------------------ I agree, InterruptedIOException would be better. > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rory Winston updated NET-208: ----------------------------- Fix Version/s: 2.0 > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > Fix For: 2.0 > > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597463#action_12597463 ] Sebb commented on NET-208: -------------------------- The bug was raised against 1.4 - so the fix version should include 1.5, no? > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > Fix For: 2.0 > > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rory Winston updated NET-208: ----------------------------- Fix Version/s: 1.5 > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > Fix For: 1.5, 2.0 > > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597609#action_12597609 ] Rory Winston commented on NET-208: ---------------------------------- Hi Sebb Indeed it should - I just tentatively wanted to make sure that IIOE was present pre JDK-1.5, which I didnt have the opportunity to check at the time. Looks like its been there since the beginning! > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > Fix For: 1.5, 2.0 > > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Closed: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rory Winston closed NET-208. ---------------------------- Resolution: Fixed > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > Fix For: 1.5, 2.0 > > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (NET-208) TelnetInputStream swallows interruptedexception as IOException[ https://issues.apache.org/jira/browse/NET-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597653#action_12597653 ] Sebb commented on NET-208: -------------------------- Applied to 2.0 as well: URL: http://svn.apache.org/viewvc?rev=657247&view=rev Log: NET-208 - TelnetInputStream swallows interruptedException as IOException [Copy of r657221] > TelnetInputStream swallows interruptedexception as IOException > -------------------------------------------------------------- > > Key: NET-208 > URL: https://issues.apache.org/jira/browse/NET-208 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Jan Van Besien > Fix For: 1.5, 2.0 > > > The TelnetInputStream catches InterruptedException in the read() method (line 342) and throws a new IOException without wrapping the InterruptedException. This means that the fact that the read() method was interrupted can hardly be distinguished from any other IOException. > I use thread interruption as a cancellation mechanism for a thread that uses the TelnetInputStream to read data. > The read method is not allowed to throw InterruptedException, so I propose to fix it by at least wrapping the underlying InterruptedException: > catch (InterruptedException e) > { > throw new IOException("Fatal thread interruption during read.", e); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free Forum Powered by Nabble | Forum Help |