29 lines
1015 B
Plaintext
29 lines
1015 B
Plaintext
=== is related to: S5754
|
||
|
||
=== on 14 Oct 2014, 21:21:47 Freddy Mallet wrote:
|
||
@Ann, could you provide the source of this RSPEC because would like to double-check the main goal of this rule ? For sure here the code snippets are really misleading because we could have the feeling that when the execution of a Runnable class is interrupted, this exception can be caught in the ``++run++`` method which is not at all the case.
|
||
|
||
=== on 15 Oct 2014, 11:59:38 Ann Campbell wrote:
|
||
\[~freddy.mallet] \https://twitter.com/aparnachaudhary/status/520952677631807488
|
||
|
||
=== on 4 Sep 2019, 20:33:20 Réda Housni Alaoui wrote:
|
||
Hi,
|
||
|
||
|
||
I think the rule derived from this spec is too narrow.
|
||
|
||
Many people write ``++catch (Exception e)++`` in their applications.
|
||
|
||
|
||
Following this spec, IMO, that means that any ``++catch(Exception e)++`` must ALWAYS be preceded by a catch of InterruptedException like this
|
||
|
||
----
|
||
catch (InterruptedException e) {
|
||
Thread.currentThread().interrupt();
|
||
} catch (Exception e) {
|
||
//...
|
||
}{code}
|
||
|
||
----
|
||
|