ASSERT-KTH/sorald

Support for S1193: Exception types should not be tested using "instanceof" in catch blocks

Opened this issue · 0 comments

S1193 fall under the CODE SMELL category, but I think it is worthwhile to implement it because the processor corresponding to this rule would have a similar implementation to what is done in #703. However, there is one caveat. We won't be able to fix if the type of catch variable is Exception. It might be possible to know which instances of the Exception can be thrown inside a try-block, but it would require us to also parse signatures of the method invoked; which might not be available everytime.